As usual, I have a ridiculously specific question about a tiny detail of a tiny calculation. There is a tremendous amount of context, so fair warning. I don't need a solution to this whole problem. I need a solution to one specific part, and it is a minor detail. I'll show what I've got so far, and point out my concern at the end.
Our problem is to use residue calculus to compute: $$\int\limits_{-\infty}^{\infty}\frac{\cos(2x)-1}{x^2}dx.$$
We note that this is equal to the real part of the easier-to-work-with integral: $$\int\limits_{-\infty}^{\infty}\frac{e^{2ix}-1}{x^2}dx,$$ and we use a "hippo's back" contour, formed by the positively-oriented half-circle $|z|\leq R$ in the upper half-plane and the line along the real axis from $-R$ to $R$, interrupted from $-\varepsilon$ to $\varepsilon$ by the negatively oriented half-circle in the upper half-plane of radius $\varepsilon$, so as to 'jump' over the simple pole at $z=0$.
Since this contour contains no poles or singularities, etc., the integral of our integrand around it is zero by Cauchy's Theorem. It is also a simple matter to show that the large half-circle's contribution is zero in the limit $R\to\infty$. So now we are left with the fact that in the limit $\varepsilon\to 0$, we obtain:
$$\int\limits_{-\infty}^{\infty}\frac{e^{2ix}-1}{x^2}dx=\lim\limits_{\varepsilon\to 0}\int\limits_{C_\varepsilon}\frac{e^{2iz}-1}{z^2}dz,$$
where $C_\varepsilon$ is the little negatively-oriented half-circle mentioned above.
Now, I know the trick in which the value of the right-hand side happens to give exactly $\pi i \text{Res}(f,0)$ (that is, half of what the full circle would give), and can use it to show that the result is $-2\pi$.
Okay, thanks for reading this far. Here is my actual question: Without resorting to tricks like the half-residue thing, how can we get this result from the right-hand side? That is, how do we prove rigorously that:
$$\lim\limits_{\varepsilon\to 0}\int\limits_{C_\varepsilon}\frac{e^{2iz}-1}{z^2}dz=-2\pi$$
I have been using the parametrization $z=\varepsilon e^{-it}$ with $t\in[0,\pi]$, where the negative in the exponential deals with the negative orientation, which almost always works in these situations, but not here, since the $\varepsilon$ does not entirely cancel from the denominator then as it usually does in these types of problems.
I have confirmed the result with Wolfram-Alpha using the original problem statement, and also noted a few other things, like that the original integrand can be expressed as $\frac{\sin^2(x)}{x^2}$, but gotten nowhere with that.
In a pinch, I'll use the 'half-residue' trick, but being able to do this simply from basic principles would be nice.