Let $\varphi$ be a scalar field whose particle has mass $m$. I have obtained the expression that gives the difference in energy relative to a particle with mass $m'$. The expression is
$$ \frac{E}{V}=-\frac{i}{2}\int \frac{d^4k}{(2\pi)^4}\log\left( \frac{k^2-m^2+i\varepsilon}{k^2-m'^2+i\varepsilon} \right) . $$
We want to integrate out the $k^0$ dependence. Furthermore, we work in units where $k^0=\omega$. We introduce $\omega_k^2=\vec k^2+m^2$ to write
$$ \frac{E}{V}=-\frac{i}{2}\int \frac{d^3k}{(2\pi)^3}\int \frac{d\omega}{2\pi}\log\left( \frac{\omega^2-\omega^2_k+i\varepsilon}{\omega^2-\omega'^2_k+i\varepsilon} \right) . $$
By an identity of the logarithm, $\log(\frac{a}{b})=\log(a)-\log(b)$, and since we are only concerned with the integral over $dk^0=d\omega$, it suffices to consider
$$ \mathcal{I}= \frac{1}{2\pi}\int \!d\omega\,\log\left( \omega^2-\omega^2_k+i\varepsilon \right) $$
We integrate by parts with \begin{align} u=&\log\left( \omega^2-\omega^2_k+i\varepsilon \right)&\qquad\text{and}\qquad du&=\frac{2\omega\,d\omega}{\omega^2-\omega^2_k+i\varepsilon }\\ v=&\omega&\qquad\text{and}\qquad dv&= d\omega \end{align}
to obtain
$$ \mathcal{I}= -\frac{1}{2\pi}\int\!d\omega\, \frac{2\omega^2}{\omega^2-\omega^2_k+i\varepsilon } .$$
In Zee's QFT 2nd Edition, page 125, he inserted a factor $\frac{d\omega}{d\omega}$ to do the integration by parts, as in
$$ \mathcal{I}= \frac{1}{2\pi}\int \!d\omega\,\frac{d\omega}{d\omega}\,\log\left( \omega^2-\omega^2_k+i\varepsilon \right) $$
QUESTION: Why did he do that? Seem like it integrates just fine without inserting that. Continuing, we will try to apply the residue formula so we factor the denominator as
$$ \mathcal{I}= -\frac{1}{2\pi}\int\!d\omega\, \frac{2\omega^2}{[\omega-(\omega_k-i\varepsilon)][\omega-(-\omega_k+i\varepsilon)]} .$$
We will choose the pole in the upper complex half plane. It does not appear to me that the integrand will trivially vanish along the semicircular path at infinity, call that path $\gamma_\infty$. Zee proceeds as if the integral along that path is zero, but I do not see it. QUESTION: How do we know that the path $\gamma_\infty$ contributes nothing? Perhaps this has something to do with the factor $\frac{d\omega}{d\omega}$ which I did not use? Why is the final term below equal to zero?
$$ 2\pi i\,\text{Res}(\omega_0^+)= \oint \!dz\,f(z) =\mathcal{I}+\underbrace{\int_{\gamma_\infty}\!dz\, \frac{2\omega^2}{\omega^2-\omega^2_k+i\varepsilon }}_{\text{???}}$$
If we set this equal to zero, then I get the correct answer for the energy.