I'm trying to understand this section in Tristan Needham's book Visual Complex Analysis about what he says is a standard method for evaluating series via a contour integral. My specific question is about the computation of the residues of $f(z) \cot \pi z$ at $z = n$. Is it in general true that $\operatorname{Res} (f \cdot g) = f \cdot \operatorname{Res} (g)$, provided that $f$ is analytic at the point of interest?
From Section 9.III.5, page 441:

Consider the definition
$$\operatorname*{Res}_{z=z_0} f(z) g(z) = \frac{1}{i 2 \pi} \oint_{C} dz \, f(z) g(z)$$
where $C$ is a simple closed contour enclosing the pole of $g$ at $z=z_0$, while $f$ is analytic at $z=z_0$. We may then write
$$f(z) = a_0 + a_1 (z-z_0) + a_2 (z-z_0)^2 + \cdots$$ $$g(z) = \cdots + b_{-2} (z-z_0)^{-2} + b_{-1} (z-z_0)^{-1} + b_0 + b_1 (z-z_0) + \cdots$$
Then
$$\operatorname*{Res}_{z=z_0} f(z) g(z) = a_0 b_{-1} + a_1 b_{-2} + a_2 b_{-3} + \cdots$$
If $z_0$ is a simple pole, then only $b_{-1}$ is nonzero, and the assertion is true. If, however, $z_0$ is a multiple pole, then the residue also depends on the values of the derivatives of $f$ at the pole as well.
The above formula for the sum in terms of the residues works because $z=n$ is a simple pole of $\cot{\pi z}$. However, if $f$ has a multiple pole at a non-integer value, then the residue of $f(z) \cot{\pi z}$ must be evaluated in terms of derivatives of $\cot{\pi z}$.