For a pole of order $n$, differentiate $(z-z_0)^nf$ exactly $n-1$ times; for a simple pole, just take the limit.Suggest a slogan
Let \(f\) be holomorphic on a punctured disc about \(z_0\in\CC\) with a pole of order \(n\geq1\) at \(z_0\). Then the residue of \(f\) at \(z_0\) is \[ \Res_{z=z_0}f=\lim_{z\to z_0}\frac{1}{(n-1)!}\frac{d^{n-1}}{dz^{n-1}}\bigl((z-z_0)^nf(z)\bigr). \] In particular, if \(z_0\) is a simple pole of \(f\), then \[ \Res_{z=z_0}f=\lim_{z\to z_0}(z-z_0)f(z). \]