Calculate $\int_{-\infty}^\infty \frac{\cos{(kx)}}{\sqrt{x^2+a^2}} \,dx$ I want to evaluate the integral 
$\int_{-\infty}^\infty \frac{\cos{(kx)}}{\sqrt{x^2+a^2}}dx$,
where $k$ and $a$ are constants. Clearly the integrand has two branch points at $\pm ia$. Let $f(z)=Re (\frac{e^{ikz}}{\sqrt{z^2+a^2}})$. Considering the upper half plane, let us integrate along the contour $\Gamma$, which is $AC_{R}BCDC_{\epsilon}EFA$ (see the plot). 

Here, $C_R$ is the semicircle of radius $R$ and $C_\epsilon$ is the circle of radius $\epsilon$. Now by Cauchy's integral theorem,
\begin{eqnarray}
\int_\Gamma f(z)dz=0 \nonumber\\
\left(\int_{AC_RB}+\int_{BC}+\int_{CD}+\int_{DC_\epsilon E}+\int_{EF}+\int_{FA}\right) f(z)dz=0
\end{eqnarray}
Let us now take the limit as $R \to \infty$, $\epsilon \to 0$, then first and fourth integrals are zero. Second and sixth integrals will give 
$2 \int_0^\infty \frac{\cos{kx}}{\sqrt{x^2+a^2}}dx$. So, now we need to integrate the third and fifth integrals whose values will contribute in this integration. Here, I'm stuck. I don't understand what will be the value of z in $CD$ or $EF$ path.
 A: Let $F(k,a)$ be given by
$$F(k,a)=\int_{-\infty}^\infty \frac{\cos(kx)}{\sqrt{x^2+a^2}}\,dx$$
Exploiting the even symmetry of the integrand and enforcing the substitution $x\to |a|x$, where we assume that $a\in \mathbb{R}$ yields
$$\begin{align}
F(k,a)&=2\int_0^\infty \frac{\cos(k|a| x)}{\sqrt{x^2+1}}\,dx\\\\
&=2\text{Re}\left(\int_0^\infty \frac{e^{ik|a| x}}{\sqrt{x^2+1}}\,dx\right)\tag 1\\\\
&=2\text{Re}\left(\int_0^\infty \frac{e^{-k|a| x}}{\sqrt{x^2-1}}\,dx\right)\tag 2\\\\
&=2\text{Re}\left(\underbrace{\int_0^1 \frac{e^{-k|a| x}}{\sqrt{x^2-1}}\,dx}_{\text{Purely Imaginary}}\right)+2\text{Re}\left(\underbrace{\int_1^\infty \frac{e^{-k|a| x}}{\sqrt{x^2-1}}\,dx}_{\text{Purely Real}}\right)\\\\
&=2\int_1^\infty \frac{e^{-k|a| x}}{\sqrt{x^2-1}}\,dx\\\\
&=2\int_0^\infty e^{-k|a| \cosh(x)}\,dx\\\\
&=2K_0(k|a|)
\end{align}$$
where $K_0(x)$ is the modified Bessel Function of the Second Kind.

NOTES:
In arriving at $(1)$, we used $\cos(k|a|x)=\text{Re}(e^{ik|a|x})$.
In going from $(1)$ to $(2)$, we chose branch cuts from $i$ to $i\infty$ and from $-i$ to $-i\infty$. Then, we applied Cauchy's Integral Theorem and deformed the real-line contour from $0$ to $R$ to the contour in the first quadrant comprised of (i) the line segment from $0$ to $i(1-\epsilon)$ , (ii) the semi-circular contour centered at $i$ with radius $\epsilon$ from $i(1-\epsilon)$ to $i(1+\epsilon)$, (iii)the line segment from $i(1+\epsilon)$ to $iR$, and (iv) the quarter-circular arc from $iR$ to $R$.  As $\epsilon \to 0$ and $R\to \infty$ the contributions from integrals around the semi-circle and the quarter circle vanish.  What remains it given by $(2)$. 


The OP edited the question and provided a specific contour over which to proceed.  We now analyze the integral over the given contour.

First note that the OP assumed that $a>0$.  We will proceed under that assumption.
If we choose to cut the plane with branch cuts from $ia$ to $-i\infty$ and $-ia$ to $-i\infty$, then on the positive real axis $\sqrt{z^2+a^2}=\sqrt{x^2+a^2}$, while on the negative real axis, $\sqrt{z^2+a^2}=-\sqrt{x^2+a^2}$.  Hence, this reveals
$$\begin{align}
\int_{\text{BC}}\frac{e^{ikz}}{\sqrt{z^2+a^2}}\,dz+\int_{\text{FA}}\frac{e^{ikz}}{\sqrt{z^2+a^2}}\,dz&=\int_{-R}^\epsilon\frac{e^{ikx}}{-\sqrt{x^2+a^2}}\,dx+\int_{\epsilon}^R\frac{e^{ikx}}{\sqrt{x^2+a^2}}\,dx\\\\
&=2i\int_\epsilon^R \frac{\sin(kx)}{\sqrt{x^2+a^2}}\,dx\tag 3
\end{align}$$
The sum of the integrals along $CD$ and $EF$ is given by 
$$\begin{align}
\int_{\text{CD}}\frac{e^{ikz}}{\sqrt{z^2+a^2}}\,dz+\int_{\text{DF}}\frac{e^{ikz}}{\sqrt{z^2+a^2}}\,dz&=\int_{0}^{a-\epsilon}\frac{e^{-ky}}{-\sqrt{-y^2+a^2}}\,i\,dy+\int_{a-\epsilon}^0\frac{e^{-ky}}{\sqrt{-y^2+a^2}}\,i\,dy\\\\
&=-2i\int_0^{a-\epsilon} \frac{e^{-ky}}{\sqrt{a^2-y^2}}\,dy\tag 4
\end{align}$$
Using $(3)$ and $(4)$, and letting $R\to \infty$ and $\epsilon\to 0$ reveals (after taking Imaginary Parts)
$$\begin{align}
\int_0^\infty \frac{\sin(kx)}{\sqrt{x^2+a^2}}\,dx&=\int_0^a \frac{e^{-kx}}{\sqrt{a^2-x^2}}\,dx\\\\
&=\frac \pi 2\left(I_0(k|a|)+L_0(k|a|)\right)
\end{align}$$
for $a>0$, where $I_0(x)$ and $L_0(x)$ are the Modified Bessel Function of the First Kind and Zero Order and the Modified Struve Function of Zero Order, respectively.
Note that the choice of contour as given in the OP, does not provide any insight regarding the integral of interest $\int_{-\infty}^\infty\frac{\cos(kx)}{\sqrt{x^2+a^2}}\,dx$.  
