In preparing some practice problems for my complex analysis students, I stumbled across the following. It is not hard to show, using Liouville's theorem, that
$$\pi\cot(\pi z)=\frac{1}{z}+\sum\_{n=1}^\infty\left(\frac{1}{z+n}+\frac{1}{z-n}\right),$$
which implies that
$$-\frac{\pi z}{2}\cot(\pi z)=-\frac{1}{2}+\sum\_{k=1}^\infty\zeta(2k)z^{2k},\qquad 0<|z|<1.$$
This formula predicts correctly that $\zeta(0)=-\frac{1}{2}$, and allows to calculate $\zeta(2k)$ as a rational multiple of $\pi^{2k}$ as well (in terms of Bernoulli numbers).


Is there some simple explanation why the above prediction $\zeta(0)=-\frac{1}{2}$ is valid? Perhaps there is a not so simple but still transparent explanation via Eisenstein series.


**Added.** Just to clarify what I mean by "simple explanation". The second identity above follows directly from the first identity, i.e. from basic principles of complex analysis:
$$-\frac{\pi z}{2}\cot(\pi z)=-\frac{1}{2}+\sum\_{n=1}^\infty\frac{z^2}{n^2-z^2}=-\frac{1}{2}+\sum\_{n=1}^\infty\sum\_{k=1}^\infty\left(\frac{z^2}{n^2}\right)^k
=-\frac{1}{2}+\sum\_{k=1}^\infty\zeta(2k)z^{2k}.$$
I would like to see a similar argument, perhaps somewhat more elaborate, that explains why the constant term here happens to be $\zeta(0)$, which seems natural in the light of the other terms.



$\zeta(0)$ and the cotangent function
This is not a completely satisfactory answer. I would like a simpler one.
Nevertheless still probably a good exercise in Complex variables.
I will only sketch it.


What we want to show is equivalent to 
$$\zeta(2n)=-\frac{1}{2\pi i}\int\_{C\_r}\frac{\pi z \cot(\pi z)}{2z^{2n+1}}\,dz,\qquad n\ge 0,\quad n\in{\bf Z}.\tag{1}$$
In fact this will be true for all $n\in{\bf Z}$. For $z=ix$ with $x>0$ we have
$$\cot(\pi z)=\cot(\pi i x)=-i-i\frac{2}{e^{2\pi x}-1}$$
it is convenient to write (1) as 
$$\zeta(2n)=-\frac{1}{2 i}\int\_{C\_r}\frac{ \cot(\pi z)+i}{2z^{2n}}\,dz,\qquad n\in{\bf Z}.\tag{2}$$


Consider now the region $\Omega$ equal to ${\bf C}$ with a cut along the positive imaginary
axis. Let $\log z$ denote the determination of the logarithm in $\Omega$ with 
$-\frac{3\pi}{2}<\arg(z)<\frac{\pi}{2}$, and let $C'\_r$ be the path of integration
that start at $i\infty$ to $ir$ (left border of the imaginary positive axis), then follows the circumference $C\_r$ from $ir$ to 
$ir$ and then go from $ir$ to $i\infty$ (right border of the imaginary positive axis).
It is easy to show that (2) is equivalent to (3)
$$\zeta(2n)=-\frac{1}{2 i}\int\_{C'\_r}\frac{ \cot(\pi z)+i}{2z^{2n}}\,dz,\qquad n\in{\bf Z}.
\tag{3}$$


The integral defines an entire function 
$$f(s)=-\frac{1}{4 i}\int\_{C'\_r}\bigl(\cot(\pi z)+i\bigr)e^{-s\log z}\,dz.\tag{4}$$


Expanding the integral we get
$$f(s)= \frac{i}{2}\bigl(e^{-\pi i s/2}-e^{3\pi i s/2}\bigr)\int\_r^{\infty}\frac{x^{-s}}{e^{2\pi x}-1}\,dx-\frac{1}{4 i}\int\_{C\_r}\bigl(\cot(\pi z)+i\bigr)e^{-s\log z}\,dz.$$
When $r\to0$ the last integral tends to $0$ if we have $\Re(s)=\sigma<0$. So in this case we
get
$$f(s)= \frac{i}{2}\bigl(e^{-\pi i s/2}-e^{3\pi i s/2}\bigr)\int\_0^{\infty}\frac{x^{-s}}{e^{2\pi x}-1}\,dx,\qquad \sigma=\Re(s)<0.$$
from which we get (5)


$$f(s)= e^{\pi i s/2}\sin(\pi s)(2\pi)^{s-1}\int\_0^{\infty}\frac{x^{-s}}{e^{x}-1}\,dx,\qquad \sigma<0.\tag{5}$$
Applying
Titchmarsh (2.4.1)
$$\zeta(s)=\frac{1}{\Gamma(s)}\int\_0^\infty\frac{x^{s-1}}{e^x-1}\,dx,\qquad \sigma>1$$
and the functional equation, yields that for $\sigma<0$ we have
$$f(s)=e^{\pi i s/2}\cos(\pi s/2)\zeta(s)\tag{6}$$
Therefore for all $s$ we have
$$e^{\pi i s/2}\cos(\pi s/2)\zeta(s)=-\frac{1}{4 i}\int\_{C'\_r}\bigl(\cot(\pi z)+i\bigr)e^{-s\log z}\,dz.\tag{7}$$
Since $f(2n)=\zeta(2n)$ for all $n\in{\bf Z}$ we have proved that the coefficient
of $z^{2n}$ in the Laurent series for $-\frac{\pi z}{2}\cot(\pi z)$ is equal to 
$\zeta(2n)$ for all $n\in{\bf Z}$.


