Partial Fractions Expansion of $\tanh(z)/z$

There is the infinite product representation

$$\cosh\,z=\prod_{k=1}^\infty \left(1+\frac{4z^2}{\pi^2(2k-1)^2}\right)$$

Taking logarithms gives

$$\log\cosh\,z=\sum_{k=1}^\infty \log\left(1+\frac{4z^2}{\pi^2(2k-1)^2}\right)$$

If we differentiate both sides, we have

$$\tanh\,z=\sum_{k=1}^\infty \frac{\frac{8z}{\pi^2(2k-1)^2}}{1+\frac{4z^2}{\pi^2(2k-1)^2}}$$

which simplifies to

$$\tanh\,z=\sum_{k=1}^\infty \frac{8z}{4z^2+\pi^2(2k-1)^2}$$

Note that the infinite product that we started with is the factorization of $\cosh$ over its (imaginary) zeroes.

Here is a related question.


In this answer, it is shown that for all $z\in\mathbb{C}\setminus\mathbb{Z}$, $$ \pi\cot(\pi z)=\frac1z+\sum_{k=1}^\infty\frac{2z}{z^2-k^2}\tag{1} $$ Applying the identity $\tan(x)=\cot(x)-2\cot(2x)$ to $(1)$ gives $$ \begin{align} \pi\tan(\pi z) &=\sum_{k=1}^\infty\frac{2z}{z^2-k^2}-\sum_{k=1}^\infty\frac{2z}{z^2-\frac{k^2}{4}}\\ &=\sum_{k=1}^\infty\frac{8z}{4z^2-(2k)^2}-\sum_{k=1}^\infty\frac{8z}{4z^2-k^2}\\ &=-\sum_{k=1}^\infty\frac{8z}{4z^2-(2k-1)^2}\\ &=\sum_{k=1}^\infty\frac{8z}{(2k-1)^2-4z^2}\tag{2} \end{align} $$ Applying the identity $\tanh(x)=-i\tan(ix)$ to $(2)$ yields $$ \pi\tanh(\pi z)=\sum_{k=1}^\infty\frac{8z}{(2k-1)^2+4z^2}\tag{3} $$ Finally, applying the change variables $z\mapsto z/\pi$ to $(3)$ reveals $$ \frac{\tanh(z)}{8z}=\sum_{k=1}^\infty\frac{1}{(2k-1)^2\pi^2+4z^2}\tag{4} $$