Infinite Series Problem Using Residues Show that $$\sum_{n=0}^{\infty}\frac{1}{n^2+a^2}=\frac{\pi}{2a}\coth\pi a+\frac{1}{2a^2}, a>0$$
I know I must use summation theorem and I calculated the residue which is:
$$Res\left(\frac{1}{z^2+a^2}, \pm ai\right)=-\frac{\pi}{2a}\coth\pi a$$
Now my question is: how do I get the last term $+\frac{1}{2a^2}$ after using the summation theorem?

The method of residues applies to sums of the form
$$\sum_{n=-\infty}^{\infty} f(n) = -\sum_k \text{res}_{z=z_k} \pi \cot{\pi z}\, f(z)$$
where $z_k$ are poles of $f$ that are not integers.  So when $f$ is even in $n$, you may express as follows:
$$2 \sum_{n=1}^{\infty} f(n) + f(0)$$
For this case, $f(z)=1/(z^2+a^2)$ and the poles $z_{\pm}=\pm i a$ and using the fact that $\sin{i a} = i \sinh{a}$, we get
$$\sum_{n=-\infty}^{\infty} \frac{1}{n^2+a^2} = \frac{\pi}{a} \text{coth}{\pi a}$$
The rest is just a little more algebra.
