Find the residue at $z=0$ of the function $$f(z)=\frac{\mathrm{e}^{\frac{1}{z}}}{z^2-2z+2}.$$
This is a very small part of a previous exam question of complex analysis. One way of doing it is decomposing $\frac{1}{z^2-2z+2}$ into partial fractions, finding the corresponding Laurent series around $z=0$, then multiplying it with the Laurent series around $z=0$ of $\mathrm{e}^{\frac{1}{z}}$.
I am wondering if there is an easier method. I would not start above method in exam conditions because of lack of time.
You can apply the residue theorem in the form $\sum\limits_{\omega\in\Omega}\operatorname*{Res}\limits_{z=\omega}f(z)=0$, where $\Omega$ is the set of singularities of $f$ (assuming it is finite) together with the point $z=\infty$, and $\operatorname*{Res}\limits_{z=\infty}f(z)$ is treated specially. In our case, $$\bbox[5pt,border:2pt solid]{\operatorname*{Res}_{z=0}f(z)+\operatorname*{Res}_{z=1+\mathrm{i}}f(z)+\operatorname*{Res}_{z=1-\mathrm{i}}f(z)=0,}$$ with $\operatorname*{Res}\limits_{z=1\pm\mathrm{i}}f(z)$ easier to compute. Another way to obtain the same is to see that the residue at $z=0$ is $$\frac{1}{2\pi\mathrm{i}}\oint_{|z|=r}f(z)\,dz=\frac{1}{2\pi\mathrm{i}}\oint_{|w|=1/r}\frac{f(1/w)}{w^2}\,dw$$ if $r>0$ is small enough; the second integral (obtained using $z=1/w$) is the sum of residues of its integrand at $w=1/(1\pm\mathrm{i})$; substituting $w=1/z$ back, we get the equality above.