There is a singularity at 0, so .
In general, is the coefficient in front of the term in the Laurent expansion of the integrand.
When the term from the sum is so .
Finally,
Main Page : Complex Variables : Contour Integrals