I have the functions $g(z)=\frac{\pi^2}{sin^2(\pi z)}$ and $f(z)=\sum_{n=0}^\infty\frac{1}{(z+n)^2}+\sum_{n=1}^\infty\frac{1}{(z-n)^2}$. I need to show that the function $f-g$ is bounded and holomorphic on $\mathbb{C}$.
I know that both $f,g$ are holomorphic on $\mathbb{C}\backslash\mathbb{Z}$ with poles at $\mathbb{Z}$, and that their Laurent series at $z=0$ both have principal part $\frac{1}{z^2}$. I am also given that they satisfy properties $f(z+1)=f(z)$, and $f(x+iy)\rightarrow0$ for $|y|\rightarrow\infty$. (Same applies for $g$).
If I could show that $f-g$ is bounded, then by Riemann extension the poles $z\in\mathbb{Z}$ would be removable singularities. Hence $f-g$ would extend to a holomorphic function on $\mathbb{C}$.
But I am struggling with the boundedness part. Since $g$ itself is not bounded and by writing out $g-f$ nothing seems to simplify/suggest that it is bounded.
Both are bounded when $z$ is not too close to an integer.
Looking around zero, which is enough, $f(z) =1/z^2+$ something bounded by comparison with $\zeta(2)$ and $\sin^2(\pi z) = (\pi z)^2+O(z^4)$ so
$\dfrac{\pi^2}{\sin^2(\pi z)} =\dfrac{\pi^2}{ (\pi z)^2+O(z^4)} =\dfrac1{z^2(1+O(z^2))} =\dfrac1{z^2}(1+O(z^2)) =1/z^2+O(1) $
so their difference is bounded.
Adding more detail.
If $|z| < c$ where $c$ is small ($c < \frac12$, in particular) then
$\begin{array}\\ |f(z)-\dfrac1{z^2}| &=|\sum_{n=1}^\infty\frac{1}{(z+n)^2}+\sum_{n=1}^\infty\frac{1}{(z-n)^2}|\\ &\le 2|\sum_{n=1}^\infty\frac{1}{(n-c)^2}|\\ &= 2|\frac1{(1-c)^2}+\sum_{n=2}^\infty\frac{1}{(n-c)^2}|\\ &\le 2|\frac1{(1-c)^2}+\sum_{n=2}^\infty\frac{1}{n(n-1)}| \qquad ((n-c)^2 > n(n-1) \text{ for } c < \frac12)\ (*)\\ &\le 2|\frac1{(1-c)^2}+\sum_{n=2}^\infty(\frac{1}{n-1}-\frac1{n})|\\ &\le 2|\frac1{(1-c)^2}+1|\\ \end{array} $
so $f(z)-\dfrac1{z^2}$ is bounded for small $z$.
$(*)\ (n-c)^2 > n(n-1) \iff n^2-2nc+c^2 > n^2-n \iff n(1-2c)+c^2 > 0 $
To show $\dfrac1{1+O(z^2)} =1+O(z^2) $, $\dfrac1{1+cz^2}-1 =\dfrac{-cz^2}{1+cz^2} $ so $|\dfrac1{1+cz^2}-1| =|\dfrac{-cz^2}{1+cz^2}| \lt 2c|z^2| $ if $|cz^2| < \frac12$ or $|z| < \sqrt{\frac1{2c}} $ so $\dfrac1{1+O(z^2)} =1+O(z^2) $ as $z \to 0$.