<s>[INST] 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}$
 [/INST] 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}}$.
</s>