Yukawa potential in 3-dimensional spacetime Assume $D$-dimensional Minkowski spacetime with one time dimension and $D\ge 2$. Using the mass-$m$ Klein-Gordon propagator for a scalar interaction, we can derive a potential energy$$E=-\int\frac{d^{D-1}k}{\left(2\pi\right)^{D-1}}\frac{\exp ik\cdot r}{k^2+m^2}$$(see e.g. Quantum Field Theory in a Nutshell Chapter I.4), with $r:=x_1-x_2$ a distance between point unit "charges". It's easy to show that if $m=0$ this result is proportional to $\ln r$ if $D=3$ and $r^{3-D}$ otherwise, and if $m\ne 0$ to $r^{3-D}e^{-mr}$ provided $D\ne 3$. I'm struggling to evaluate the massive case with $D=3$, viz.$$E=-\int_0^{2\pi}\frac{d\theta}{4\pi^2}\int_0^\infty\frac{k\exp \left(ikr\cos\theta\right)}{k^2+m^2}dk.$$Expanding the exponential as a power series, odd-power terms vanish under the $\theta$ integration, so$$E=-\int_0^{\pi/2}\frac{d\theta}{\pi^2}\int_0^\infty\frac{u\cos \left(u\cos\theta\right)}{u^2+\left(mr\right)^2}du,$$which is real as expected. Defining $f\left( a,\,b\right):=\int_0^\infty\dfrac{u\cos au \,du}{u^2+b^2}$, we have$$E=-\int_0^{\pi/2}\frac{d\theta}{\pi^2}f\left(\cos\theta,\,mr\right).$$However, I've been unable to evaluate $f$, let alone this integral based on it.
 A: Let us denote the integral as $D(r)$. One of the simplest way to evaluate it is using of Schwinger parametrization,
$$\frac{1}{k^2+m^2}=\frac{1}{2}\int_{0}^{\infty}d\alpha\,\exp\left(-\frac{\alpha(k^2+m^2)}{2}\right)$$
and then find the complete square,
$$\frac{\alpha(m^2+{\bf k}^2)}{2}-i{\bf k}\cdot{\bf r}=\frac{1}{2}\left(\sqrt{\alpha}{\bf k}-\frac{i{\bf r}}{\sqrt{\alpha}}\right)^2+\frac{1}{2}\left(\frac{{\bf r}}{\sqrt{\alpha}}\right)^2+\frac{\alpha m^2}{2}.$$
Next it is easy to perform Gaussian integration,
$$\int\frac{d^{D-1}k}{(2\pi)^{D-1}}\exp\left(-\frac{1}{2}\left(\sqrt{\alpha}{\bf k}-\frac{i{\bf r}}{\sqrt{\alpha}}\right)^2 \right)=(2\pi\alpha)^{-(D-1)/2},$$
with keeping in mind the remainder $e^{-r^2/2\alpha}$, so finally
$$D({\bf r})=\frac{1}{2(2\pi)^{(D-1)/2}}\int_0^{\infty}d\alpha\,\alpha^{-(D-1)/2}\exp\left(-\frac{\alpha m^2}{2}-\frac{{\bf r}^2}{2\alpha}\right).$$
Next, we perform substitution $\alpha=\lambda/t$, so
$$\frac{\alpha m^2}{2}+\frac{{\bf r}^2}{2\alpha}=\frac{\lambda m^2}{2t}+\frac{r^2t}{2\lambda} \rightarrow \lambda=\frac{r}{m},$$
which immediately gives
$$D(r)=\frac{1}{(2\pi)^{d/2}}\frac{1}{2}\frac{1}{\lambda}\int_{0}^{\infty}dt\,\left(\frac{t}{\lambda}\right)^{d/2-2}\exp\left(-\frac{mr}{2}\left(t+\frac{1}{t}\right)\right),$$
where $d=D-1$. The final result is
$$\boxed{D(r)=\frac{1}{(2\pi)^{d/2}}\left(\frac{m}{r}\right)^{d/2-1}K_{d/2-1}(mr)},$$
with $d=D-1$. What about the massless case? It is easy to show that
$$\boxed{E(r)=-\frac{2^{d/2-1}}{(2\pi)^{d/2}}\frac{1}{r^{d-2}}\Gamma\left(\frac{d}{2}-1\right).}$$
P.S.: I can make a mistake with dimension $D$, however the calculation strategy is clear (for me).
P.S.: It seems that the question about asymptotic behavior is discussed here
A: Make a substitution of integration variables: d$\theta$ -> dcos$\theta$. Then you can get to a integral only in k which can be evaluated using contour integration and the Cauchy Residue theorem. 
