Let $z \in \mathbb{C}$ and let $f(x)=e^{i \pi zx}$ for $x \in (-1,1)$. Extend $f$ on the real line with period $2$. I have to compute its Fourier series and deduce that $$\frac{\pi^2}{\sin^2(\pi z)} = \sum_{k\ \in \mathbb{Z}} \frac{1}{(z-k)^2}$$
The Fourier coefficients are $$\widehat{f}(k)=\frac{1}{2}\int_{-1}^{1} e^{i\pi zx} e^{-i\pi k x}dx = \frac{e^{i\pi (z-k)}-e^{-i\pi (z-k)}}{2i\pi(z-k)}=(-1)^k\frac{e^{i\pi z}-e^{-i\pi z}}{2i\pi(z-k)}=(-1)^k\frac{\sin(\pi z)}{\pi(z-k)}$$
Hence we get $$\frac{\sin(\pi z)}{\pi} \sum_{k\ \in \mathbb{Z}} \frac{(-1)^k}{z-k}e^{i\pi kx}=e^{i\pi z x}.$$ I'm stuck here.
Edit:
If I compute it in $x = 1 $, since $e^{i\pi k}=(-1)^k $ I get
$$\sum_{k\ \in \mathbb{Z}} \frac{1}{z-k}= \frac{\pi e^{i\pi z}}{\sin(\pi z)}.$$