Show, for $z\not\in\mathbb{Z}$, that $$\sum_{n=-\infty}^{n=\infty}\frac{1}{n^2-z^2} = \frac{-\pi}{z\tan(\pi z)}$$ Hint: You may assume that there exists $C$ such that $|\pi\cot(\pi w)|\leq C$ for all $n \in \mathbb{N}$ and all $w \in \Gamma_n$, where $\Gamma_n$ is the square with vertices $\pm(n+\frac{1}{2})(1\pm i)$.
I don't see how to approach this (if via the residue theorem, I cannot see the function we might integrate over the contour $\Gamma_n$).
So far I have proved that the Left Hand Side is holomorphic on $\mathbb{C}\setminus\mathbb{Z}$, and shown the series uniformly converges on any disk contained within this region. Any hints would be very much appreciated.
Some ideas. There's quite a few things to justify, among them taking the Principal Value of the series after the logarithmic differentiation.
Take the infinite product for the sine function:
$$\sin \pi z=\pi z\prod_{n=1}^\infty\left(1-\frac{z^2}{n^2}\right)=\pi z\prod_{0\neq n=-\infty}^\infty\left(1+\frac zn\right)\implies$$
$$\log\sin\pi z=\log\pi z+\sum_{0\neq n=-\infty}^\infty\log\left(1+\frac zn\right)$$
and now differentiate:
$$\pi\cot\pi z=\frac1z+\sum_{0\neq n=-\infty}^\infty\frac1{n+z}=\frac1z+\sum_{n=1}^\infty\left(\frac1{z+n}+\frac1{z-n}\right)=$$
$$=\frac1z+\sum_{n=1}^\infty\frac{2z}{z^2-n^2}$$