Contour integration of a Bessel function using the Hankel function I'm trying to evaluate the following integral involving the Bessel function of zeroth order and first kind
\begin{equation}
I=\int_0^\infty dx\frac{x J_0 (bx)}{x^2-a^2-\mathrm{i}0^+}\,.
\end{equation}
My approach is to use the relationship between the Bessel and Hankel functions (8.476 6 in  Gradshteyn & Ryzhik )
\begin{equation}
J_0(x)=\frac{1}{2}[H_0^{(1)}(x)-H_0^{(1)}(-x)]
\end{equation}
to write the integral over the whole real line
\begin{equation}
I=P.V.\int_{-\infty}^\infty dx\frac{x H_0^{(1)} (bx)}{x^2-a^2-\mathrm{i}0^+}\,.
\end{equation}
Here I have introduced the principle value to avoid the logarithmic singularity at $x=0$. Since the asymptotic form of the Hankel function is
\begin{equation}
H_0^{(1)} (z)\sim\sqrt{\frac{2}{\pi z}} \mathrm{e}^{\mathrm{i}(z-\pi/4)}\,,
\end{equation}
it seems like we can use contour integration by closing the contour with a semi-circle in the upper half complex plane, since this contribution will vanish by Jordan's lemma. Given that the small semi circle avoiding the logarithmic singularity at $x=0$ vanishes as well, what remains is the residue contribution from the pole at $x=a+\mathrm{i}0^+$, and thus the integral is given
\begin{equation}
I=\int_0^\infty dx\frac{x J_0 (bx)}{x^2-a^2-\mathrm{i}0^+}=\mathrm{i}\pi H_0^{(1)}(ab)\,.
\end{equation}
This seems relatively simple but I have never seen a source that follows this approach precisely. Is the method valid or have I missed some subtleties?
 A: Without certainty, I'd say that the expression $H_0^{(1)}(-x)$ is ill-defined for $x < 0$, since $H_0^{(1)}(x) = J_0(x) + {\rm i}Y_0(x)$ and, while $J_0(x)$ can be extended along the x-axis as an even function, the same can't be said about $Y_0(x)$, which is ill-defined for $x < 0$. I have stumbled upon the expression $H_0^{(1)}(-x)$ for $x > 0$ in several textbooks, however it is always used as a notation to refer to $-H_0^{(2)}(x)$. That being said, and without even getting into the discussion of how to properly extend the integration limits from $(0,\infty)$ to $(-\infty,\infty)$ given that the Hankel functions have a logarithmic singularity at $x = 0$, I believe that the integration cannot contain the negative x-axis due to the integrand being ill-defined - you would probably need to define a different contour. If I were in your shoes, I'd simply follow the usual path of treating the integral as the Hankel transform of $(x^2 + \gamma^2)^{-1}$, with $\gamma = -{\rm i}(a + {\rm i}0^+)$. Interestingly, this approach and your approach yield the same result, however I am positive that the process of getting to this final result is incorrect in your case.
EDIT: I've added a few more information on the Hankel transform I talked about. From Gradshteyn and Ryzhik, 2007, Eq. 6.532.4 reads
$$ \int_0^{\infty}{\frac{xJ_0(ax)}{x^2 + k^2}dx} = K_0(ak) $$
for $a > 0$ and $Re(k) > 0$. In your case, the result is $K_0(\gamma b)$, or, after taking the limit to $0^+$, $K_0(-{\rm i}ab)$.
