Computing alternating sum using contour integration 
By considering the integral of:
$$\left(\frac{\sin\alpha z}{\alpha z}\right)^2 \frac{\pi}{\sin \pi z},\quad \alpha<\frac{\pi}{2}$$
around a circle of large radius, prove that:
$$\sum\limits_{n=1}^\infty (-1)^{m-1} \frac{\sin ^2 m\alpha}{(m \alpha)^2} = \frac{1}{2}$$

Attempt at answer:
I can see that I have poles at $z=n$, and a double pole at $z=0$.
So in order to perform the contour integration, I first find the residues for $z=n$:
$$\frac{\pi}{\sin\pi z} = \frac{1}{z} \left( 1 + \frac{(\pi z)^2}{3!} + ...\right)$$
the $1/z$ part is equal to $1$, so the residues are $$\sum\limits_{n=-N}^N \frac{\sin ^2 n\alpha}{(n \alpha)^2}$$
Next, finding the residue at $z=0$: I found it to be $=1$, by series expansion.
I know that if I let my function tend to zero as the contour encloses all the poles, I have that:
$$2\pi i \left(2 \sum\limits_{n=1}^\infty \frac{\sin ^2 n\alpha}{(n \alpha)^2} + 1\right) = 0$$
So I'm very almost there - but I have no idea where the $(-1)^{m-1}$ factor comes from, and also - if I rearrange the last equation, I get that the sum is $-\frac{1}{2}$ (i.e. not positive).
If anyone could help find where I'm going wrong, that would be great!
 A: In general, if $k$ is a positive integer greater than or equal to $2$, $$\sum_{m=1}^{\infty} \frac{(-1)^{m-1} \sin^{k}(\alpha m)}{ m^{k}} = \frac{\alpha^{k}}{2} \, , \quad |\alpha| \le \frac{\pi}{k}.$$
We first need to argue that  $$\lim_{N \to \infty} \int_{|z|=N+\frac{1}{2}} \left(\frac{\sin\alpha z}{ z}\right)^k \frac{\pi}{\sin \pi z} \, dz = 0$$ if $|\alpha| \le \frac{\pi}{k}$.
But this follows from the fact that as $\text{Im}(z) \to \pm \infty$,  $\left|\frac{\sin^{k}(\alpha z)}{\sin(\pi z)} \right|$ behaves like $\frac{1}{2^{k-1}} e^{\pm (k |\alpha|-\pi) \, \text{Im}(z)}$. 
So we have 
$$ \begin{align} 2\sum_{m=1}^{\infty} \frac{(-1)^{m-1} \sin^{k}(\alpha m)}{ m^{k}} &= \text{Res} \left[\left(\frac{\sin\alpha z}{ z}\right)^k \frac{z}{\sin \pi z} , \, 0 \right] \\ &= \lim_{z \to 0} \left(\frac{\sin\alpha z}{  z}\right)^k \frac{\pi z}{\sin \pi z}  \\ &=a^{k}(1) \\&= a^{k}. \end{align}$$
A: You calculated residues wrongly. By your series around $z=0$ you can only find residue at $z=0$. When $z=n$ you know that poles are of first order, so use the formula
$$R_a=\lim_{z\to a} \frac{\pi(z-a)}{\sin(\pi z)}$$
You will get that $R_0=1,R_1=-1,R_2=1,...$ and your formula will look like the following.
$$2\pi i \left(2 \sum\limits_{n=1}^\infty(-1)^n \frac{\sin ^2 n\alpha}{(n \alpha)^2} + 1\right) = 0$$
