[proofplan]
We integrate $f$ over a large positively oriented circle $\gamma_R$ of radius $R$ that encloses all finite singularities $z_1, \ldots, z_k$. By [Cauchy's Residue Theorem](/theorems/352) applied inside the circle, the integral equals $2\pi i$ times the sum of the finite residues. By the substitution $w = 1/z$, we transform the integral into a contour integral around $w = 0$ that computes $-\operatorname{Res}(f, \infty)$. Equating the two expressions gives the result.
[/proofplan]
[step:Choose a circle enclosing all finite singularities and apply the Residue Theorem]
Since the set $\{z_1, \ldots, z_k\} \subset \mathbb{C}$ is finite, choose $R > \max_{1 \le j \le k} |z_j|$ so that all finite singularities lie strictly inside the disc $B(0, R)$. Let $\gamma_R: [0, 2\pi] \to \mathbb{C}$ be the circle $\gamma_R(t) = Re^{it}$, traversed counterclockwise. The function $f$ is holomorphic on the simply connected domain $B(0, R+1)$ except at the isolated singularities $z_1, \ldots, z_k$, and $\gamma_R$ is a piecewise $C^1$ closed curve in $B(0, R+1) \setminus \{z_1, \ldots, z_k\}$. By [Cauchy's Residue Theorem](/theorems/352),
\begin{align*}
\frac{1}{2\pi i} \oint_{\gamma_R} f(z) \, dz = \sum_{j=1}^{k} n(\gamma_R, z_j) \operatorname{Res}(f, z_j) = \sum_{j=1}^{k} \operatorname{Res}(f, z_j),
\end{align*}
where $n(\gamma_R, z_j) = 1$ for each $j$ since every $z_j$ lies inside the circle $\gamma_R$.
[guided]
We need a contour that captures all finite residues simultaneously. Since the singularities $z_1, \ldots, z_k$ form a finite subset of $\mathbb{C}$, we can choose $R > \max_{1 \le j \le k} |z_j|$ so that all of them lie strictly inside the disc $B(0, R)$. Define the contour $\gamma_R: [0, 2\pi] \to \mathbb{C}$ by $\gamma_R(t) = Re^{it}$ (the circle of radius $R$ centred at the origin, traversed counterclockwise).
To apply [Cauchy's Residue Theorem](/theorems/352), we need $f$ to be holomorphic on a simply connected domain containing $\gamma_R$, except at the isolated singularities. The open disc $B(0, R+1)$ is simply connected, $f$ is holomorphic on $B(0, R+1) \setminus \{z_1, \ldots, z_k\}$, and $\gamma_R \subset B(0, R+1) \setminus \{z_1, \ldots, z_k\}$ since $|z_j| < R$ for all $j$. The winding number $n(\gamma_R, z_j) = 1$ for each $j$ because every $z_j$ lies in the interior of the circle. Applying the theorem:
\begin{align*}
\frac{1}{2\pi i} \oint_{\gamma_R} f(z) \, dz = \sum_{j=1}^{k} \operatorname{Res}(f, z_j).
\end{align*}
[/guided]
[/step]
[step:Transform the integral via $w = 1/z$ to express it in terms of $\operatorname{Res}(f, \infty)$]
Perform the substitution $w = 1/z$, so $z = 1/w$ and $dz = -w^{-2} \, dw$. Under this change of variable, the contour $\gamma_R(t) = Re^{it}$ maps to
\begin{align*}
\tilde{\gamma}(t) = \frac{1}{R} e^{-it}, \qquad t \in [0, 2\pi],
\end{align*}
which is the circle of radius $1/R$ traversed clockwise. Substituting:
\begin{align*}
\oint_{\gamma_R} f(z) \, dz = \oint_{\tilde{\gamma}} f\!\left(\frac{1}{w}\right) \left(-\frac{1}{w^2}\right) dw = -\oint_{\tilde{\gamma}} \frac{1}{w^2} f\!\left(\frac{1}{w}\right) dw.
\end{align*}
Reversing the orientation of $\tilde{\gamma}$ to obtain the counterclockwise circle $\tilde{\gamma}^-$ of radius $1/R$ around $0$:
\begin{align*}
\oint_{\gamma_R} f(z) \, dz = \oint_{\tilde{\gamma}^-} \frac{1}{w^2} f\!\left(\frac{1}{w}\right) dw.
\end{align*}
[guided]
We now relate the contour integral to the behaviour of $f$ at infinity. The standard tool is the substitution $w = 1/z$, which maps a neighbourhood of $\infty$ on the Riemann sphere to a neighbourhood of $0$. Under this substitution, $z = 1/w$ and $dz = -w^{-2} \, dw$.
**Image of the contour.** The contour $\gamma_R(t) = Re^{it}$ maps to $\tilde{\gamma}(t) = (1/R) e^{-it}$. The factor $e^{-it}$ (rather than $e^{it}$) shows that the orientation reverses: $\tilde{\gamma}$ traverses the circle of radius $1/R$ clockwise.
**Substituting into the integral:**
\begin{align*}
\oint_{\gamma_R} f(z) \, dz = \oint_{\tilde{\gamma}} f\!\left(\frac{1}{w}\right) \left(-\frac{1}{w^2}\right) dw = -\oint_{\tilde{\gamma}} \frac{1}{w^2} f\!\left(\frac{1}{w}\right) dw.
\end{align*}
Since $\tilde{\gamma}$ is clockwise, reversing its orientation to $\tilde{\gamma}^-$ (counterclockwise) introduces a sign change:
\begin{align*}
-\oint_{\tilde{\gamma}} \frac{1}{w^2} f\!\left(\frac{1}{w}\right) dw = \oint_{\tilde{\gamma}^-} \frac{1}{w^2} f\!\left(\frac{1}{w}\right) dw.
\end{align*}
[/guided]
[/step]
[step:Identify the integral with $-\operatorname{Res}(f, \infty)$ and conclude]
By definition, the residue of $f$ at $\infty$ is
\begin{align*}
\operatorname{Res}(f, \infty) := -\operatorname{Res}\!\left(\frac{1}{w^2} f\!\left(\frac{1}{w}\right),\, 0\right).
\end{align*}
Define $h: \mathbb{C} \setminus \{0\} \to \mathbb{C}$ by $h(w) := w^{-2} f(1/w)$. Since $R$ was chosen so that $f$ has no singularities for $|z| > R$ (except possibly at $\infty$), the function $h$ is holomorphic on $0 < |w| < 1/R$, with $w = 0$ as its only singularity in $B(0, 1/R)$. Applying [Cauchy's Residue Theorem](/theorems/352) to $h$ on $B(0, 1/R)$:
\begin{align*}
\frac{1}{2\pi i} \oint_{\tilde{\gamma}^-} h(w) \, dw = \operatorname{Res}(h, 0) = -\operatorname{Res}(f, \infty).
\end{align*}
Combining the results of the previous steps:
\begin{align*}
\sum_{j=1}^{k} \operatorname{Res}(f, z_j) = \frac{1}{2\pi i} \oint_{\gamma_R} f(z) \, dz = \frac{1}{2\pi i} \oint_{\tilde{\gamma}^-} h(w) \, dw = -\operatorname{Res}(f, \infty).
\end{align*}
Rearranging:
\begin{align*}
\sum_{j=1}^{k} \operatorname{Res}(f, z_j) + \operatorname{Res}(f, \infty) = 0.
\end{align*}
[guided]
The residue of a meromorphic function $f$ at $\infty$ is defined by transferring the problem to $w = 0$ via $w = 1/z$. The precise definition is
\begin{align*}
\operatorname{Res}(f, \infty) := -\operatorname{Res}\!\left(\frac{1}{w^2} f\!\left(\frac{1}{w}\right),\, 0\right).
\end{align*}
The minus sign in the definition accounts for the orientation reversal: the "counterclockwise" direction around $\infty$ on the Riemann sphere corresponds to the clockwise direction around $0$ in the $w$-chart.
Define $h: \mathbb{C} \setminus \{0\} \to \mathbb{C}$ by $h(w) := w^{-2} f(1/w)$. Since $f$ is meromorphic on $\hat{\mathbb{C}}$ with finite singularities only at $z_1, \ldots, z_k$, and all of these satisfy $|z_j| < R$, the function $f$ is holomorphic for $|z| > R$, i.e., on $\{z \in \mathbb{C} : |z| > R\}$. Under $w = 1/z$, this region maps to $\{w \in \mathbb{C} : 0 < |w| < 1/R\}$, so $h$ is holomorphic on this punctured disc with $w = 0$ as its only possible singularity.
We apply [Cauchy's Residue Theorem](/theorems/352) to $h$ on the simply connected domain $B(0, 1/R)$, with the single singularity at $w = 0$. The winding number of $\tilde{\gamma}^-$ around $0$ is $1$ (counterclockwise circle around the origin). Therefore:
\begin{align*}
\frac{1}{2\pi i} \oint_{\tilde{\gamma}^-} h(w) \, dw = \operatorname{Res}(h, 0) = -\operatorname{Res}(f, \infty).
\end{align*}
Chaining together the equalities from all three steps:
\begin{align*}
\sum_{j=1}^{k} \operatorname{Res}(f, z_j) &= \frac{1}{2\pi i} \oint_{\gamma_R} f(z) \, dz \qquad &\text{(Residue Theorem in } B(0, R+1)\text{)} \\
&= \frac{1}{2\pi i} \oint_{\tilde{\gamma}^-} h(w) \, dw \qquad &\text{(substitution } w = 1/z\text{)} \\
&= -\operatorname{Res}(f, \infty) \qquad &\text{(definition of residue at } \infty\text{)}.
\end{align*}
Rearranging gives the desired identity:
\begin{align*}
\sum_{j=1}^{k} \operatorname{Res}(f, z_j) + \operatorname{Res}(f, \infty) = 0.
\end{align*}
[/guided]
[/step]