<s>[INST] Partial fraction decomposition of $\pi\cdot \tan(\pi z)$ 
Evaluate the partial fraction decomposition of $\pi \tan(\pi z)$ 

$$2\pi \tan(\pi z)=\cot\left(\frac{\pi}{2}-\pi z\right)-\cot\left(\frac{\pi}{2}+\pi z\right)$$ $$=\frac{2}{1-2z}+\sum_{k=1}^\infty \frac{1-2z}{(\frac{1}{2}-z)^2-k^2}-\frac{2}{1+2z}-\sum_{k=1}^\infty \frac{1+2z}{(\frac{1}{2}-z)^2-k^2}$$
$$=\frac{8z}{1-4z^2}+\sum_{k=1}^\infty \frac{4-8z}{1-2z+4z^2-4k^2}-\sum_{k=1}^\infty \frac{4+8z}{1+2z+4z^2-4k^2}$$
I know that the result should be $$\pi \tan(\pi z)=\sum_{k=1}^\infty \frac{8z}{(2k+1)^2-4z^2}$$ but I dont know how to get there.
Any suggestions?
 [/INST] Hint. If you know that, for $0<z<1/2$,
$$
\pi \cot (\pi z)=\sum_{k=1}^\infty \left(\frac{1}{z-k}+\frac{1}{z+k-1}\right)
$$ then by putting $z \to 1/2-z$ you get
$$
\begin{align}
\pi \cot (\pi (1/2-z))&=\pi \tan(\pi z)
\\\\&=\sum_{k=1}^\infty \left(\frac{1}{1/2-z-k}+\frac{1}{1/2-z+k-1}\right)
\\\\&=\sum_{k=1}^\infty\frac{8 z}{(2k-1)^2-4 z^2}
\end{align}
$$ as wanted.
</s>