Let $ \displaystyle f(z) = \frac{e^{ikz}}{z-a}$ where $k>0$ and $\text{Im}(a) >0$.
Let $C_{R}$ be the upper half of the circle $|z|=R$.
Then $$ \int_{C_{R}} f(z) \, dz = \int_{0}^{\pi} \frac{e^{ik{Re^{i \theta}}}}{Re^{i \theta}-a} \, i Re^{i \theta} \, d \theta = \int_{0}^{\pi} \frac{e^{ikR \cos \theta}e^{- k R \sin \theta} }{Re^{i \theta} - a} \, iRe^{i \theta} \, d \theta.$$
In a textbook I came across, the author argues that $\int_{C_{R}}f(z) \, dz$ vanishes as $R \to \infty$ because $e^{-kR \sin \theta}$ vanishes as $R \to \infty$. But don't you have to justify moving the limit inside the integral?
Using some bounds, you can actually prove it without bringing the limit inside; you find an upper bound on the integrand (using absolute values), then integrate and make the conclusion. In this case, you need to use $$\sin(\theta)\geq\frac{2}{\pi}\theta\quad \text{for}\quad 0\leq\theta\leq\frac{\pi}{2}.$$ In particular, this means $e^{-R\sin\theta}\leq e^{(-2R/\pi)\theta}$. Use a similar bound for $\frac{\pi}{2}\leq\theta\leq\pi$. Now we can integrate and get the result sought. The first half follows: \begin{align} \left|\int_0^{\pi/2} f(z)\,dz\right|&\leq\int_0^{\pi/2}\left|f(z)\right|\,dz\\ &\leq\int_0^{\pi/2} \frac{R}{R-|a|}\cdot e^{-Rk\sin\theta}\,d\theta\\ &\leq\frac{R}{R-|a|}\int_0^{\pi/2} e^{(-2kR/\pi)\theta}\,d\theta\\ &=\frac{R}{R-|a|}\cdot\left.\frac{e^{(-2kR/\pi)\theta}}{(-2kR/\pi)}\right|_{\theta=0}^{\theta=\pi/2}. \end{align}
Now the end clearly goes to zero for all $k>0$.