Computing $\sum \frac{1}{n^2(n^2+a^2)}$ using the residue theorem I have to find a closed form for $\sum_{n=1}^{\infty}\frac{1}{n^2(n^2+a^2)}$ (with $a\in \mathbb{R}$). 
My idea was to use the residue theorem on $f(z)=\frac{\pi \cot(\pi z)}{z^2(z^2+a^2)}$, thus obtaining:
\begin{equation}
\text{Res}_{0}(f)+\text{Res}_{\pm ia}(f)+2\sum_{n=1}^{\infty}\frac{1}{n^2(n^2+a^2)}
=
\lim_{n\to \infty}\frac{1}{2\pi i}\oint_{c_n}f(z)dz
\end{equation}
($c_n$ is a circle with $r=n+\frac{1}{2}$, in order to avoid poles on the contour.)
Going on:
\begin{equation}
2\sum_{n=1}^{\infty}\frac{1}{n^2(n^2+a^2)}=\frac{\pi^2}{3a^2}-\frac{\pi\coth(\pi a)}{a^3}+\lim_{n\to \infty}\frac{1}{2\pi i}\oint_{c_n}f(z)dz
\end{equation}
At this point, I was quite sure that the integral was $0$, but this does not match the closed form I know to be true.
My questions are:


*

*Is my approach correct? (maybe using
Poisson summation formula, even if it seems to me quite long to deal with the singularity of the series in $n=0$)

*What kind of tecniques should I apply to compute the integral? 
Note:
As Denklo noted, we can calculate the series using $\frac{1}{n^2}-\frac{1}{n^2+a^2}=\frac{a^2}{n^2(n^2+a^2)}$. The closed form is thus $\frac{1}{2a^4}-\frac{\pi \coth(\pi a)}{2a^3}+\frac{\pi^2}{6a^2}$, which is consistent with my results so far and should imply $\frac{1}{2\pi i}\oint f=\frac{1}{a^4}$
 A: We first decompose the series in two parts:
$\sum_{n=1}^{\infty} \dfrac{1}{n^{2}(n^{2}+a^{2})} = \dfrac{1}{a^{2}} \sum_{n=1}^{\infty} \dfrac{1}{n^{2}} - \dfrac{1}{a^{2}} \sum_{n=1}^{\infty} \dfrac{1}{n^{2} + a^{2}}$.
For the first series we use $\sum_{n=1}^{\infty} \dfrac{1}{n^{2}}  = \dfrac{\pi^{2}}{6}$.
For the second series we use the identity $\sum_{n = -\infty}^{\infty} \dfrac{1}{n^{2} + a^{2}} = \dfrac{\pi}{a} coth(\pi a)$ in order to get $\sum_{n = 1}^{\infty} \dfrac{1}{n^{2} + a^{2}} = \dfrac{\pi}{2a} coth(\pi a) - \dfrac{1}{2a^{2}}$.
The final result is given by:
$\sum_{n=1}^{\infty} \dfrac{1}{n^{2}(n^{2}+a^{2})} = \dfrac{\pi^{2}}{6a^{2}} - \dfrac{\pi}{2a^{3}} coth(\pi a) - \dfrac{1}{2a^{4}}$.
A: The error in my chain of thought was in $\text{Res}_0(f)$, which is not $-\frac{\pi^2}{3a^2}$, it is instead $-\frac{\pi^2}{3a^2}-\frac{1}{a^4}$
A: Expanding a little on Denklo's comment
We can solve a more general sum,
$$\sum_{-\infty}^{\infty} \frac{1}{n^{2}+a^{2}} = \frac{\pi}{a} \coth(\pi a).$$
Note that this sum satisfies the conditions in the above link. The poles lie at $z=ia$ and $z=-ia$, so
    $$\sum_{n=-\infty}^{\infty} \frac{1}{n^{2}+a^{2}} = -\pi\left[\operatorname{Res}\left(\frac{\cot(\pi z)}{z^{2}+a^{2}},ia\right) + \operatorname{Res}\left(\frac{\cot(\pi z)}{z^{2}+a^{2}},-ia\right)\right].$$
Computing the residues:
    $$\operatorname{Res}\left(\frac{\cot(\pi z)}{z^{2}+a^{2}},ia\right) = \lim_{z\rightarrow ia}\frac{(z-ia)\cot(\pi z)}{(z-ia)(z+ia)} = \frac{\cot(\pi ia)}{2i a} $$
and
    $$ \operatorname{Res}\left(\frac{\cot(\pi z)}{z^{2}+a^{2}},-ia\right) = \lim_{z\rightarrow  -ia}\frac{(z+ia)\cot(\pi z)}{(z+ia)(z-ia)} = \frac{\cot(i\pi a)}{2ia}.$$
Therefore, summing these we get 
    $$\sum_{-\infty}^{\infty} \frac{1}{n^{2}+a^{2}} = -\frac{\pi\cot(i\pi a)}{ia} = \frac{\pi \coth(\pi a)}{a}.$$
You should be able to extend this idea to your sum along with the other term in $n^{-2}$. 
