Contour integral with two poles I want to perform the following integral, using the Residue theorem:
$$ I=\int_{0}^{\infty} f(q) dq = \frac{1}{i r (2 \pi)^2} \int_{0}^{\infty} dq \frac{q \left( e ^{iqr} -  e^{-iqr}\right)}{M^2 + K q^2} =\frac{1} {2 i r (2 \pi)^2} \int_{- \infty}^{\infty} dq \frac{q \left( e ^{iqr} -  e^{-iqr}\right)}{\left(q + \frac{iM}{\sqrt{K}}  \right) \left( q - \frac{iM}{\sqrt{K}}\right)K}$$
Now I see that I have two poles (at $ q = \pm \frac{i M}{\sqrt{K}}$), but I don't understand how to take the integral with two poles properly and the answer I get is not correct.
I will give my calculation for the upper pole, but somehow I have an extra exponent which I don't know how to get rid of.
$$ \int_{- \infty}^{\infty} f(q) dq= \text{Res}(f, {M i}/{\sqrt{K}}) = 2 \pi i \lim_{q \to \frac{M i}{ \sqrt{K}}}  \frac{1} {2 i r (2 \pi)^2}  \frac{q \left( e ^{iqr} -  e^{-iqr}\right)}{\left(q + \frac{iM}{\sqrt{K}}  \right)K} =  \frac{1} {2  r (2 \pi)}  \frac{e^{\frac{-M r}{ \sqrt{K}}}- e^{\frac{M r}{\sqrt{K}}}}{2} $$
For the other contour I get the same result, but I know that the final result should be:
$$I=\frac{e ^{\frac{- r M}{\sqrt{K}}}}{4 \pi K r}. $$
 But then my exponent should go away, furthermore I don't really understand how to combine the two contour integrals. They are around different poles, but to calculate the integral over the real axis I cannot go around both contours with one integral. Could someone please explain how to do this integration properly and how to combine these two integrals.

Hint:
$$
\int_{-\infty}^\infty dx \, \frac{x e^{ix}}{x^2+a^2} = 
\int_{0}^\infty dx \, \frac{x \left(e^{ix}-e^{-ix}\right)}{x^2+a^2} \; .
$$
Thus, you evaluate the former integral by closing the contour in the upper-half plane and evaluating the residue at $x = i a$.  The result is
$$
\oint dx \, \frac{x e^{ix}}{x^2+a^2} = i \pi e^{-a} \; .$$
