Calculate $\int_{-\infty}^{\infty} \frac{\sin(mx)}{x(a^2+x^2)} dx$ My initial thought was to consider the contour integration of $$\frac{e^{imz}}{z(z^2-a^2)}=\frac{e^{imz}}{z(z+ai)(z-ai)}$$ Over the 'D-shaped' arc of a semicircle in the upper half plane. The reason for this is that in similar problems taking this approach worked applying residue theorem, however there is now a pole at $z=0$ which would lie on the contour.
I was wondering whether it is possible to form a small arc around $0$ to not include it in the contour, and whether this would have an effect on the calculation or would I obtain something along the lines of $$2 \pi i \left[ \lim \limits_{z \to ia} \frac{e^{imz}}{z(z+ia)} \right].$$
 A: Contour integration that avoids the pole is possible, but not how I would evaluate the integral. I would proceed using Parseval's Theorem, which I outline below.
Throughout this answer, I have assumed that $a,m>0$. If they are not in your example, then a couple of minus signs or absolute values might pop up throughout the computation, but it should not substantially change.
The Fourier transform of 
$$f(x) = \frac{\sin mx}{x}$$
is given by 
\begin{align}
\hat{f}(k) &= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \frac{\sin mx}{x}e^{-ikx}dx\\
&=\frac{1}{2i\sqrt{2\pi}}\left[\int_{-\infty}^\infty\frac{e^{i(m-k)x}}{x}dx -
 \int_{-\infty}^\infty\frac{e^{-i(m+k)x}}{x}dx\right]
\end{align}
Differentiating with respect to $k$, we obtain
\begin{align}
\frac{d\hat{f}}{dk} &= \frac{1}{2\sqrt{2\pi}}\left[\int_{-\infty}^{\infty}e^{-i(m+k)x}\,dx - \int_{-\infty}^\infty e^{i(m-k)x}\,dx\right]\\
&=\sqrt{\frac{\pi}{2}}\left[\delta(k+m) - \delta(k-m)\right]
\end{align}
Integrating once, we have
$$\hat{f}(k) = \sqrt{\frac{\pi}{2}}\left[H(k+m) - H(k-m)\right]$$
The Fourier Transform of
$$g(x) = \frac{1}{x^2+a^2}$$
is given by 
\begin{align}
\hat{g}(k) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty\frac{e^{-ikx}}{x^2+a^2}\,dx
\end{align}
Consider assume that $k$ is positive. We evaluate the integral by considering a semi-circle contour $\Gamma$ along the real axis that runs from $-R$ to $R$ and is then closed in the lower half plane, where the negative imaginary part of $z$ makes the contribution along the arc of the semi-circle vanish as $R\rightarrow \infty$.
Thus, we have:
\begin{align}
\hat{g}(k) &= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty\frac{e^{-ikx}}{x^2+a^2}\,dx\\
&=\frac{1}{\sqrt{2\pi}}\oint_\Gamma \frac{e^{-ikz}}{z^2+a^2}\,dz\\
&=\sqrt{2\pi}i\operatorname{Res}\left(\frac{e^{ikz}}{z^2+a^2},-ia\right)\\
&=\sqrt{2\pi}i\lim\limits_{z\rightarrow -ia}\frac{e^{-ikz}}{z-ia}\\
&=\sqrt{\frac{\pi}{2}}\frac{e^{-ak}}{a}
\end{align}
Analogously, we close the contour in the upper half-plane for negative values of $k$ and left with the following expression:
$$\hat{g}(k) =\sqrt{\frac{\pi}{2}}\frac{e^{-a|k|}}{a}$$
Now, by Parseval's theorem, we have:
$$\int_{-\infty}^\infty f(x)g(x)\,dx = \int_{\infty}^\infty \hat{f}(k)\hat{g}(k)\,dk$$
Thus, we have
\begin{align}
\int_{-\infty}^\infty \frac{\sin mx}{x(x^2+a^2)}\,dx &= \frac{\pi}{2a}\int_{-\infty}^\infty e^{-a|k|}\left[H(k+m) - H(k-m)\right]\\
&=\frac{\pi}{2a}\int_{-m}^m e^{-a|k|}\,dk\\
&=\frac{\pi}{2a}\left[\int_{-m}^0 e^{ak}\,dk + \int_0^m e^{-ak}\,dk\right]\\
&=\frac{\pi}{2a}\left[\frac{1}{a}\left(1-e^{-am}\right) + \frac{1}{a}\left(1-e^{-am}\right)\right]\\
\end{align}
Grouping terms together, we have

$$\int_{-\infty}^\infty \frac{\sin mx}{x(x^2+a^2)}\,dx = \frac{\pi}{a^2}\left(1-e^{-am}\right)$$

A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\int_{-\infty}^{\infty}{\sin\pars{mx} \over x\pars{x^{2} + a^{2}}}\,\dd x & =
\,\mrm{sgn}\pars{m}\Im\int_{-\infty}^{\infty}{\expo{\ic\verts{m}x} - 1 \over x\pars{x + \ic\verts{a}}\pars{x - \ic\verts{a}}}\,\dd x
\\[5mm] & =
\,\mrm{sgn}\pars{m}\Im\bracks{2\pi\ic\,
{\expo{\ic\verts{m}\pars{\ic\verts{a}}} - 1 \over
\pars{\ic\verts{a}}\pars{2\ic\verts{a}}}} =
\bbx{{\pi\,\mrm{sgn}\pars{m} \over a^{2}}\pars{1 - \expo{-\verts{ma}}}}
\end{align}
A: The pole at $z=0$ is removable since $\displaystyle\lim_{z\to0}\frac{\sin(mz)}{z}=1$. In other words, $1/z$ produces a pole which is counteracted by $\sin(mz)$ since $\sin(0)=0$, both of which are of order one, so the pole at $z=0$ is of order $1-1=0$
