MATLAB: Problem with double sums

double sums

how to write this function in MATLAB knowing that if I separate the two sums as I wrote one tends to infinity.
The first idea I wrote
then check my code in some values ​​of f as an example but the result is because