I was thinking if I could solve the sum $\sum_{n=1}^\infty \frac{1}{n^2+1}$, and I reached using the laplace transform of the sine at the integral $\int_0^\infty \frac{\sin(t)}{e^t-1} dt$. I entered the sum into Wolfram Alpha, and it gave me $\frac{1}{2}(\pi \coth(\pi) - 1)$. How it reached this value?? If someone can help me, I will be grateful.
MY TRY: $$\sum_{n=1}^\infty \frac{1}{n^2+1}=\sum_{n=1}^\infty \mathcal{L}(\sin(t))(s = n) = \sum_{n=1}^\infty \int_0^\infty \sin(t)e^{-nt}dt=\int_0^\infty \sin(t)\sum_{n=1}^\infty e^{-nt} dt$$ Observe that $\sum_{n=1}^\infty e^{-nt} = \frac{e^-t}{1-e^-t} = \frac{1}{e^t-1}$. Then $$\sum_{n=1}^\infty \frac{1}{n^2+1}=\int_0^\infty \frac{\sin(t)}{e^t-1}dt$$
Consider the partial sum $$S_p=\sum_{n=1}^p \frac 1{n^2 + a^2} =\sum_{n=1}^p \frac 1{(n+i a) (n-i a)} $$ Using partial fraction decomposition $$\frac 1{(n+i a) (n-i a)}=\frac i{2a} \left(\frac{1}{n+i a}-\frac{1}{n-i a}\right)$$ Use the generalized harmonic numbers $$\sum_{n=1}^p \frac 1{n+b}=H_{p+b}-H_b$$ Replace $b$ by $\pm ia$ and use the asymptotics for large values of $p$ to obtain $$S_p= \frac{i}{2 a} \left(H_{-i a}-H_{i a}\right)-\frac{1}{p}+\frac{1}{2 p^2}+\frac{2 a^2-1}{6 p^3}+O\left(\frac{1}{p^4}\right)$$ Take into account that $$H_{-i a}-H_{i a}=i \left(\frac{1}{a}-\pi \coth (\pi a)\right)$$ Therefore $$S_p=\frac{\pi a \coth (\pi a)-1}{2 a^2}-\frac{1}{p}+\frac{1}{2 p^2}+\frac{2 a^2-1}{6 p^3}+O\left(\frac{1}{p^4}\right)$$ which gives the limit and shows how it is approached.