How do I compute the residues of the complex function in order to evaluate the following real integral using Cauchy's theorem?
$$ I = \int_{-\infty}^{\infty} dE \left[\frac{E^2f(E)}{(E-E_n-i\eta)^2(E-E_m-i\eta)} -\frac{E^2f(E)}{(E-E_n+i\eta)^2(E-E_m+i\eta)} \right] $$ In the above expression, $f(E)=\frac{1}{e^{\beta E}-1}$, and $E_n$, $E_m$, and $\eta$ are real positive numbers. I believe that constructing a contour on the upper half of the complex plane will lead to contributions only from the first term of the integrand, as its poles at $E_n+i\eta$ and $E_m+i\eta$ will lie inside the contour. However, I am struggling to determine how to calculate the residues for this complex equation.