Solving improper integral involving the absolute-value function using contour integration Problem
In a paper I stumbled across the following integral:
$$
I_{kl} = \int_{-\infty}^\infty\!\frac{(2\pi i f)^k(-2\pi i f)^l}{\prod_{j=1}^p |2\pi i f - r_j|^2} \,\mathrm{d}f
$$
where $k,l=0,\ldots,p-1$ and $r_1,\ldots,r_p\in \mathbb{C}$ with $\Re(r_j)<0$. The authors state that it can be evaluated by using contour integration:
$$
I_{kl} = \sum_{j=1}^p\frac{r_j^k(-r_j)^l}{-2\Re(r_j)\prod_{m\neq j}(r_m-r_j)(\bar{r}_m+r_j)}
$$
Unfortunately, the paper doesn't give a more elaborate explanation on the calculation. Moreover, the roots $r_j$ seem to have to be distinct (the paper doesn't mention that explicitly).
I would like to also allow for roots with multiplicity $\sigma_j$ but in order to do that I need to follow the derivation above. As I only have a background in physics I only know the basics of complex analysis and will show my efforts below.
Status
As a first step I do a simple substitution: $z=2\pi i f$
$$
I_{kl} = \int_{i\mathbb{R}}\!\frac{z^k(-z)^l}{\prod_{j=1}^p |z - r_j|^2} \,\frac{\mathrm{d}z}{2\pi i}
$$
Then, I define a contour that is starting at $(0,-R)$, following on the imaginary axis until $(0,R)$ and returning to the starting point on an arc through the left half of the complex plane completing a semi-circle. Since all $r_j$ are contained in this contour I only need to calculate the sum of their residues (according to the residue theorem) and show that the integral along the arc vanished in the limit of $R\rightarrow\infty$.
My problem is that I don't know how to handle the absolute function in the denominator. I would be very happy if you could tell me:


*

*Is the basic approach I'm following correct?

*How do I calculate the residues?

*How do I show if the integral along the arc vanishes?


Thanks a lot in advance!
Edit: Attention! Please do not attempt to answer this question! Immediately after I posted this question, I was looking at it with a fresh mind and accidentally solved it. I will post my answer below soon.
 A: As an alternative, I present a solution that makes use of the residue theorem. 
The integral can be rewritten into the following form:
\begin{align}
I_{kl} &= \int_{-\infty}^\infty\!\frac{(2\pi i f)^k(-2\pi i f)^l}{\prod_{j=1}^p |2\pi i f - r_j|^2} \,\mathrm{d}f\\
&= \int_{-\infty}^\infty\!\frac{(2\pi i f)^k(-2\pi i f)^l}{\prod_{j=1}^p (2\pi i f - r_j)(-2\pi i f - \bar{r}_j)} \,\mathrm{d}f\\
&= \int_{i\mathbb{R}}\!\frac{(z)^k(-z)^l}{\prod_{j=1}^p (r_j - z)(\bar{r}_j + z)} \,\frac{\mathrm{d}z}{2 \pi i}
\end{align}
Let $\Gamma_R$ and $\gamma_R$ be contours defined as $\Gamma_R: [-R, R] \to \mathbb{C}$ with $t \mapsto i t$ and $\gamma_R: [\frac{\pi}{2}, \frac{3\pi}{2}]$ with $t \mapsto R e^{it}$. The integral can be expressed in terms of a contour integral which encloses all $r_j$ as $\Re(r_j)<0$. Applying the residue theorem and assuming that the integral along the arc vanishes for $R\to\infty$ we yield the following:
\begin{align}
I_{kl} &= \lim_{R\to\infty} \left[\int_{\Gamma_R+\gamma_R}\! f(z) \,\frac{\mathrm{d}z}{2 \pi i} - \int_{\gamma_R}\! f(z) \,\frac{\mathrm{d}z}{2 \pi i}\right] &\text{with }f(z)=\frac{(z)^k(-z)^l}{\prod_{j=1}^p (r_j - z)(\bar{r}_j + z)}\\
&= \frac{2\pi i}{2\pi i} \sum_{j=1}^p \mathrm{Res}(f, r_j) - 0
\end{align}
As all $r_j$ are first order poles their residues can be computed as follows:
\begin{align}
\mathrm{Res}(f,r_j) &= \lim_{z\to r_j} (z-r_j)f(z)\\
&= \lim_{z\to r_j} \frac{(z)^k(-z)^l}{-(\bar{r}_j + z)\prod_{m\neq j} (r_m - z)(\bar{r}_m + z)}\\
&= \frac{(r_j)^k(-r_j)^l}{-2\Re(r_j)\prod_{m\neq j} (r_m - r_j)(\bar{r}_m + r_j)}
\end{align}
Finally, we can conclude that
\begin{align}
I_{kl} &= \sum_{j=1}^p \frac{(r_j)^k(-r_j)^l}{-2\Re(r_j)\prod_{m\neq j} (r_m - r_j)(\bar{r}_m + r_j)}
\end{align}
General case
The integral can also be evaluated assuming $\Re(r_j)\neq 0$ for $j=1,\dots,p$. Let's first take a look at all singularities of $f(z)$. They are located at $p_j=r_j$ and at $q_j=-\bar{r}_j$. Since for all $r_j$ with negative real part the poles $q_j$ lay outside of the contour we can disregard those. For $\Re(r_j)>0$ it's the opposite, we must consider the residue at $z=q_j$. Thus, the sum over the residues has to be adjusted.
$$
I_{kl} = \sum_{\Re(r_j)<0}\mathrm{Res}(f,r_j) + \sum_{\Re(r_j)>0}\mathrm{Res}(f,-\bar{r}_j)
$$
The residues at $z=q_j$ are given by
\begin{align}
\mathrm{Res}(f,-\bar{r}_j) &= \lim_{z\to -\bar{r}_j} (z+\bar{r}_j)f(z)\\
&= \lim_{z\to -\bar{r}_j} \frac{(z)^k(-z)^l}{(\bar{r}_j - z)\prod_{m\neq j} (r_m - z)(\bar{r}_m + z)}\\
&= \frac{(-\bar{r}_j)^k(\bar{r}_j)^l}{2\Re(r_j)\prod_{m\neq j} (r_m + \bar{r}_j)(\bar{r}_m -\bar{r}_j)}\\
&= \left(\frac{(-r_j)^k(r_j)^l}{2\Re(r_j)\prod_{m\neq j} (\bar{r}_m + r_j)(r_m -r_j)}\right)^*
\end{align}
Finally, the contour integration yields
\begin{align}
I_{kl} &= \sum_{\Re(r_j)<0}\frac{(r_j)^k(-r_j)^l}{-2\Re(r_j)\prod_{m\neq j} (r_m - r_j)(\bar{r}_m + r_j)} + \sum_{\Re(r_j)>0}\frac{(-r_j)^k(r_j)^l}{2\Re(r_j)\prod_{m\neq j} (\bar{r}_m + r_j)(r_m -r_j)}\\
&= (-1)^l\sum_{\Re(r_j)<0}\frac{r_j^{k+l}}{2|\Re(r_j)|\prod_{m\neq j} (r_m - r_j)(\bar{r}_m + r_j)}+(-1)^k\sum_{\Re(r_j)>0}\left(\frac{r_j^{k+l}}{2|\Re(r_j)|\prod_{m\neq j} (r_m - r_j)(\bar{r}_m + r_j)}\right)^*
\end{align}
