Mittag-Leffler decomposition of $\frac{z}{e^z-1}$ Expand $\frac{z}{e^z-1}$ in M-L fractions.
This function has poles at $z=2\pi ni$ for $n\in\mathbb{Z}-\{0\}$ and apparent singularity at $z=0$, of course $\lim_{z\to0}f(z)=1$.
$$Res(f,2\pi ni)=2\pi ni$$
So from the formula $f(z)=f(0)+\sum_{n=1}^{\infty}(\frac{b_n}{z-a_n}+\frac{b_n}{a_n})$ we get:
$$f(z)=1+\sum_{n\in\mathbb{Z}-\{0\}}(\frac{2\pi ni}{z-2\pi ni}+1)=1+\sum_{n\in\mathbb{Z}-\{0\}}\frac{z}{z-2\pi ni}$$
What is wrong with this solution and how can I improve it? I know it is wrong, because my teacher told me so, but I do not understand his explanation.
He wrote that correct solution should be $$\frac{z}{e^z - 1} = 1 - \frac{1}{2} z + \sum_{k=1}^\infty \frac{2z^2}{z^2 + 4k^2\pi^2}$$
 A: Let $f(z)$ be represented by the series
$$\begin{align}
f(z)&=\sum_{n=-\infty}^\infty \left(\frac{1 }{z-i2n\pi }\right)\tag1\\\\
&=\frac1z+\sum_{n=1}^\infty\left(\frac{2z }{z^2+4\pi^2 n^2 }\right)\tag2
\end{align}$$

Let $g(z)$ be defined as 
$$g(z)=\frac{1}{e^z-1}\tag3$$

Denote $h(z)=g(z)-f(z)$ so that
$$h(z)=\frac{1}{e^z-1}-\sum_{n=-\infty}^\infty \left(\frac{1 }{z-i2n\pi }\right)\tag4$$

NOTE $1$:
It is easy to see from $(1)$, $(3)$, and $(4)$ that $f(z)$, $g(z)$, and $h(z)$ are $i2\pi$-periodic and that $h(z)$ is entire.  We need only analyze $h(z)$ on the strip $0\le \text{Im}(z)\le i2\pi$.

NOTE $2$:
If we can show that $h(z)$ is bounded for $0\le \text{Im}(z)\le i2\pi$, then Liouville's theorem guarantees that $h(z)$ is constant.  So, if $h(z)$ is bounded on the strip, then use of $h(z)=h(0) =-\frac12$ along with $(2)$ and $(4)$ would yield the coveted result 
$$\frac{z}{e^z-1}=1-\frac12 z +\sum_{n=1}^\infty \left(\frac{2z^2}{z^2+4\pi^2z^2}\right)$$

NOTE $3$:
In the following, we borrow from the development given in this answer by @ChristopherA.Wong.
On the strip $0\le \text{Im}(z)\le i2\pi$, observe that $\lim_{\text{Re}(z)\to\infty}g(z)=0$ and $\lim_{\text{Re}(z)\to-\infty}g(z)=-1$.  We conclude, therefore that $g(z)$ is uniformly bounded away from its poles at $z=0$ and $z=i2\pi$.
Next we write 
$$\begin{align}
\left|\sum_{n=1}^\infty\left(\frac{2z }{z^2+4\pi^2 n^2 }\right)\right|&\le\frac2{|z|}\left|\sum_{1\le n\le |z|/\pi}\left(\frac{1 }{1+4\pi^2 n^2/z^2 }\right)\right|+\left|\sum_{n\ge |z|/\pi}\left(\frac{2z }{z^2+4\pi^2 n^2 }\right)\right|
\end{align}$$
For sufficiently large $\text{Re}(z)$, $|1+4\pi^2n^2/|z|^2|>1$ for all $n\le |z|/\pi$.  Hence, we have the trivial estimate
$$\frac2{|z|}\left|\sum_{n\le |z|/\pi}\left(\frac{1 }{1+4\pi^2 n^2/z^2 }\right)\right|\le \frac{2}{\pi}\tag5$$
In addition, we have the estimates
$$\begin{align}
\left|\sum_{n\ge |z|/\pi}\left(\frac{2z }{z^2+4\pi^2 n^2 }\right)\right|&\le \sum_{n\ge |z|/\pi}\left(\frac{2|z| }{4\pi^2 n^2 -|z|^2}\right)\\\\
&\le \sum_{n\ge |z|/\pi} \frac{2|z|}{3\pi^2 n^2}\\\\
&\le \int_{|z|/\pi-1}\frac{2|z|}{3\pi^2 x^2}\,dx\\\\
&=\frac{2|z|}{3\pi(|z|-\pi)}\tag6
\end{align}$$
For $\text{Re}(z)$ sufficiently large, the estimate on the right-hand side of $(6)$ can be bounded uniformly.  Putting together $(5)$ and $(6)$, we find that $f(z)$ is uniformly bounded away from its poles.  
Finally, since $f(z)$ and $g(z)$ are uniformly bounded away from their poles, then $h(z)$ is bounded, entire, and hence a constant.
And we are done!
