When I read P.W. Milonni's book "Fast light, slow light, and left-handed light", I encounter this problem. In chapter 2 of the book, the author introduces the integral $$G(z,\tau)=\frac{1}{2\pi}\int_{-\infty}^\infty d\omega e^{-i\omega\tau}e^{i \omega n(\omega)z/c}$$ to calculate the front velocity of light. Because $\lim_{\omega\rightarrow\infty}n(\omega)=1$, the integrand reduces to $e^{i\omega(z/c-\tau)}$ as $\omega\rightarrow\infty$. Then the author says that for $z/c-\tau>0$, the integral can involve the infinite semicircle $C_R$ in the upper half complex plane. In other words, he means $$\int_{C_R}e^{ikz}dz=0\qquad (\text{if}\ k>0)$$ Actually, there is a similar problem in Jackson's "Classical electrodynamics" (see the derivation of (7.127) in page 337 of Jackson's book). However, I doubt the correctness of the integral. For the general principle of changing the real integral $\int_{-\infty}^{\infty}f(x)dx$ to a contour integral involving $C_R$ in the upper half plane, the integrand should satisfy $z\,f(z)\rightarrow 0$ uniformly as $|z|\rightarrow \infty$ both in the upper half plane and on the real axis. But in the above integral, $\lim_{x\rightarrow\infty}x\,e^{ikx}\neq 0$ on real axis.
On the other hand, the analyticity of $e^{ikz}$ in upper half plane leads to $$\left(\int_{-\infty}^\infty +\int_{C_R}\right)e^{ikz}dz=0.$$ And because the Fourier transform of $\delta$ function is $$\int_{-\infty}^\infty e^{ikz}dz=2\pi\delta(k), \qquad\int_{C_R}e^{ikz}dz=0$$ seems also rational. Could anyone give me a rigorous demonstration or falsification of the integral?
The function $f(z)=e^{ikz}$ is entire. In particular, it is holomorphic on and in the bounded region defined by the contour $C_R$. The contour integral of any holomorphic function in this way is always zero. This is a fundamental result of basic complex analysis.
Edit: This answer doesn't address the original question. As OP points out, $C_R$ is only a semicircular arc, not the entire closed contour.