The value of $\sum_{n=-\infty}^{n=\infty}\frac{1}{n^2-z^2}$ on $\mathbb{C}\setminus\mathbb{Z}$ 
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.
 A: You can actually prove this using Fourier series: consider the Fourier series of $\cos{\alpha x}$ on $[-\pi,\pi]$. The function is continuous, and differentiable except at the endpoints, so the Fourier series converges to the function everywhere. Some easy integration will show you that the Fourier coefficients are such that the series is
$$ \cos{\alpha x} = \frac{2\alpha \sin{\pi \alpha}}{\pi} \left( \frac{1}{2\alpha^2} + \sum_{n=1}^{\infty} \frac{(-1)^n}{\alpha^2-n^2} \cos{nx} \right). $$
Now setting $x=\pi$ and $\alpha=z$ gives
$$ \frac{\pi \cot{\pi z}}{z} = \sum_{n=-\infty}^{\infty} \frac{1}{z^2-n^2}.  $$

What the question might actually be looking for, on the other hand, is the method explained on p.134 of Whittaker and Watson, which is a valuable resource for these sorts of slightly off-the-beaten-track results.
A: 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}$$
