This is a standard exercise on residue theory. If $f$ is a rational function
with zero of order $\geq 2$ at infinity and no poles at integers, then
$$\sum_{-\infty}^\infty f(n)=-\sum{\mathrm{res}}_af(z)\pi\cot\pi z,$$
where the summation is over all poles of $f$. For $f(z)=1/(1+z^2)$ we obtain
$$\sum_0^\infty\frac{1}{1+n^2}=(\pi\coth\pi+1/2)/2$$