TITLE: Show $\sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2}$
QUESTION [43 upvotes]: How to show the following equality?
$$\sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2}$$

REPLY [11 votes]: Now, a real analytic proof. This one has no flaws (I hope).
Lemma 1. Integration by parts gives:
$$\frac{1}{a}\int_{0}^{+\infty}\cos(n x)\,e^{-a x}\,dx = \frac{1}{a^2+n^2} = \int_{0}^{+\infty}\frac{\sin(n x)}{n}\,e^{-a x}\,dx.$$
Lemma 2. The series 
$$\sum_{n=1}^{+\infty}\frac{\sin(nx)}{n}$$
converges on $\mathbb{R}\setminus 2\pi\mathbb{Z}$ to the function:
$$ f(x) = \pi\left(\frac{1}{2}-\left\{\frac{x}{2\pi}\right\}\right).$$
Lemma 3. The dominated convergence theorem hence gives:
$$\sum_{n=1}^{+\infty}\frac{1}{a^2+n^2}=\pi\int_{0}^{+\infty}\left(\frac{1}{2}-\left\{\frac{x}{2\pi}\right\}\right)e^{-ax}\,dx,$$
and by splitting $[0,+\infty)$ as $[0,2\pi)\cup[2\pi,4\pi)\cup\ldots$ we have:

$$\sum_{n=1}^{+\infty}\frac{1}{a^2+n^2}=\frac{e^{2a\pi}}{e^{2a\pi}-1}\int_{0}^{2\pi}\frac{\pi-x}{2}e^{-ax}dx=\frac{\pi a \coth(\pi a)-1}{2a^2}.$$