$\frac{1}{z} \prod_{n=1}^{\infty} \frac{n^2}{n^2 - z^2} = \frac{1}{z} + 2z\sum_{n=1}^{\infty} \frac{(-1)^n}{z^2-n^2}$? I am trying to show that

$$\frac{1}{z} \prod_{n=1}^{\infty} \frac{n^2}{n^2 - z^2} = \frac{1}{z} + 2z\sum_{n=1}^{\infty} \frac{(-1)^n}{z^2-n^2}$$

This question stems from the underlying homework problem, which asks to show
$$ \frac{\pi}{\sin(\pi z)} = \frac{1}{z} + 2z\sum_{n=1}^{\infty} \frac{(-1)^n}{z^2-n^2}, $$
to which I am at my wits end.  I have a couple of identities on hand, namely
$$ \pi \cot (\pi z) = \frac{1}{z} + \sum_{n \in \mathbb{Z}; n \neq 0} \frac{1}{z - n} + \frac{1}{n} $$
and
$$ \frac{\sin (\pi z)}{\pi} = z \prod_{n=1}^{\infty} \left( 1 - \frac{z^2}{n^2} \right) $$
and
$$ \frac{\pi^2}{\sin^2 (\pi z)} = \sum_{n \in \mathbb{Z}} \frac{1}{(z - n)^2} $$
I've tried fooling around with these identities and am getting nowhere.  Any hints or suggestions would be greatly appreciated.
 A: In this answer, it is derived that
$$
\begin{align}
\pi\cot(\pi z)
&=\sum_{k=-\infty}^\infty\frac{1}{z+k}\\
&=\frac1z+\sum_{k=1}^\infty\frac{2z}{z^2-k^2}\tag{1}
\end{align}
$$
To get the alternating series, note that
$$
\begin{align}
\frac1z+2z\sum_{k=1}^\infty\frac{(-1)^k}{z^2-k^2}
&=\sum_{k=-\infty}^\infty\frac{(-1)^k}{z+k}\\
&=\sum_{k=-\infty}^\infty\frac{2}{z+2k}-\frac1{x+k}\\
&=\sum_{k=-\infty}^\infty\frac{1}{z/2+k}-\frac1{x+k}\\[6pt]
&=\pi\cot(\pi z/2)-\pi\cot(\pi z)\\[7pt]
&=\pi\frac{1+\cos(\pi z)}{\sin(\pi z)}-\pi\frac{\cos(\pi z)}{\sin(\pi z)}\\
&=\frac\pi{\sin(z)}\tag{2}
\end{align}
$$
A: $$\sum_{n=1}^\infty\frac{(-1)^n}{z^2-n^2}=2\sum_{n=1}^\infty\frac{1}{z^2-(2n)^2}-\sum_{n=1}^\infty\frac{1}{z^2-n^2}$$
$$=\frac{1}{2}\sum_{n=1}^\infty\frac{1}{(z/2)^2-n^2}-\sum_{n=1}^\infty\frac{1}{z^2-n^2}$$
Now since,
$$\pi \cot(\pi z)=\frac{1}{z}+2z\sum_{n=1}^\infty\frac{1}{z^2-n^2}$$
We get that, $$\pi\coth(\frac{\pi z}{2})=\frac{2}{z}+2z\frac{1}{2}\sum_{n=1}^\infty\frac{1}{(z/2)^2-n^2}$$
And so, $$\pi\cot(\frac{\pi z}{2})-\pi \cot(\pi z)=\frac{1}{z}+2z(\frac{1}{2}\sum_{n=1}^\infty\frac{1}{(z/2)^2-n^2}-\sum_{n=1}^\infty\frac{1}{z^2-n^2})
$$
$$=\frac{1}{z}+2z\sum_{n=1}^\infty \frac{(-1)^n}{z^2-n^2}$$
Now since $$\cot(\frac{\pi z}{2})-\cot(\pi z)=\frac{1}{\sin(\pi z)}$$
We get that:
$$\frac{\pi}{\sin(\pi z)}=\frac{1}{z}+2z\sum_{n=1}^\infty \frac{(-1)^n}{z^2-n^2}$$
As required
A: Let $ \displaystyle f(z) = \frac{\pi}{\sin \pi z} - \frac{1}{z}$.
Then according to the Mittag-Leffler pole expansion theorem, $$ \frac{\pi}{\sin \pi z} - \frac{1}{z} = f(0) + \sum_{n=1}^{\infty} \text{Res}[f,n] \Big( \frac{1}{z-n} + \frac{1}{n} \Big) + \sum_{n=1}^{\infty} \text{Res}[f,-n] \Big( \frac{1}{z+n} - \frac{1}{n} \Big)$$
$$ = \sum_{n=1}^{\infty} (-1)^{n} \Big( \frac{1}{z-n} + \frac{1}{n} \Big) + \sum_{n=1}^{\infty} (-1)^{n} \Big( \frac{1}{z+n} - \frac{1}{n} \Big)$$
$$ = \sum_{n=1}^{\infty} (-1)^{n} \Big(\frac{1}{z-n} + \frac{1}{z+n} \Big) = \sum_{n=1}^{\infty} (-1)^{n} \frac{2z}{z^{2}-n^{2}}$$
