Define
$$f(z):=\frac{e^{iaz}}{z^2-b^2}\;,\;a,b\in\Bbb R^+\;,$$
$$C_R:=[-R,-b-\epsilon]\cup\gamma_{-b,\epsilon}\cup[-b+\epsilon,b-\epsilon]\cup\gamma_{b\epsilon}\cup[b+\epsilon,R]\cup\Gamma_R$$
with
$$\gamma_{r,s}:=\{r+se^{it}\;;\;0\le t\le \pi\}\;,\;r,s\in\Bbb R^+\;,\;\Gamma_R:=\{Re^{it}\;;\;0\le t\le \pi\}\;,\;\;R\in\Bbb R^+$$
Since $\;f(z)\;$ analytic on and within $\;C_R\;$ , we get
$$\oint\limits_{C_R}f(z)\,dz=0$$
By the corollary to the lemma in the second answer here we get
$$\begin{align*}\lim_{\epsilon\to 0}\int\limits_{\gamma_{-b,\epsilon}}f(z)dz&=i\pi\,\text{Res}\,(f)_{z=-b}=i\pi\frac{e^{-iab}}{-2b}=-\frac{\pi i}{2b}e^{-iab}\\
\lim_{\epsilon\to 0}\int\limits_{\gamma_{b,\epsilon}}f(z)dz&=i\pi\,\text{Res}\,(f)_{z=b}=i\pi\frac{e^{iab}}{2b}=\frac{\pi i}{2b}e^{iab}\end{align*}$$
And applying Jordan's Lemma the integral on $\;\Gamma_R\;$ goes to zero when $\;R\to \infty\;$ , so in the end
$$0=\lim_{R\to\infty\,,\,\epsilon\to 0}\oint\limits_{C_R}f(z)dz=\int\limits_{-\infty}^\infty f(x)dx-\frac{\pi i}{2b}\left(e^{iab}-e^{-iab}\right)\implies$$
$$\implies \int\limits_{-\infty}^\infty f(x)dx=-\frac\pi b\frac{e^{iab}-e^{-iab}}{2i}=-\frac\pi b\sin(ab)$$
and I get the same as you did...
Divergent Integral
Note that
$$
\frac{\cos(2\pi x)}{x^2-1}=\frac{\cos(2\pi x)}2\left(\frac1{x-1}-\frac1{x+1}\right)
$$
The integral diverges at $x=-1$ and $x=1$, but we can compute the Cauchy Principal Value, which involves removing a small interval centered around each singularity.
Cauchy Principal Value
The reason that centering is important is that if the singularity is of the first order, then we have a situation similar to
$$
\int_{-1}^{-r}\frac1x\,\mathrm{d}x+\int_r^1\frac1x\,\mathrm{d}x=0
$$
where the effect of the singularity is cancelled around an interval centered on $0$ since $\frac1x$ is an odd function.
An easy way to approach the evaluation of the Cauchy Principal Value is using contour integration. Consider the integral of $\frac1z$ along the contour $\color{#0000FF}{[-1,-r]}\cup\color{#C000FF}{re^{i[\pi,0]}}\cup\color{#0000FF}{[r,1]}$:
$$
\begin{align}
&\int_{-1}^{-r}\frac1z\,\mathrm{d}z+\int_{\pi}^0\overbrace{\frac1{re^{i\theta}}}^{1/z}\,\overbrace{\vphantom{\frac1z}ire^{i\theta}\mathrm{d}\theta}^{\mathrm{d}z}+\int_r^1\frac1z\,\mathrm{d}z\\
&=\log(r)+\int_\pi^0i\,\mathrm{d}\theta-\log(r)\\
&=-\pi i
\end{align}
$$
which is $-\pi i$ times the residue of $\frac1z$ at $0$ since the contour takes $\frac12$ turn clockwise around $0$.
Thus, we can compute the Cauchy Principal Value by computing a contour integral and subtracting the contributions of semicircles around the singularities, which will be $\pi i$ times the residues of those singularities.
There are at least two ways to evaluate the Cauchy Principal Value for this problem.
Contour Integration
Using the counter-clockwise contour, which contains no singularities,
$$
\small\color{#00A000}{\gamma}=\color{#0000FF}{[-R,-1-r]}\cup\overbrace{\color{#C000FF}{re^{i[\pi,0]}-1}}^{\begin{array}{c}\text{$\frac12$ turn clockwise}\\\text{about $-1$}\end{array}}\cup\color{#0000FF}{[-1+r,1-r]}\cup\overbrace{\color{#C000FF}{re^{i[\pi,0]}+1}}^{\begin{array}{c}\text{$\frac12$ turn clockwise}\\\text{about $+1$}\end{array}}\cup\color{#0000FF}{[1+r,R]}\cup\overbrace{\color{#C00000}{Re^{i[0,\pi]}}}^{\text{vanishes}}
$$
as $R\to\infty$ and $r\to0$, we get that
$$
\begin{align}
\small\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x^2-1}\,\mathrm{d}x
&\,\small=\mathrm{Re}\!\left(\color{#0000FF}{\int_{-R}^{-1-r}\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x}
+\color{#0000FF}{\int_{-1+r}^{1-r}\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x}
+\color{#0000FF}{\int_{1+r}^R\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x}\right)\\
&\small=\mathrm{Re}\!\left(\color{#00A000}{\int_\gamma\frac{e^{2\pi iz}}{z^2-1}\,\mathrm{d}z}
+\color{#C000FF}{\pi i\operatorname*{Res}_{z=-1}\left(\frac{e^{2\pi iz}}{z^2-1}\right)}
+\color{#C000FF}{\pi i\operatorname*{Res}_{z=1}\left(\frac{e^{2\pi iz}}{z^2-1}\right)}\right)\\
&\small=\mathrm{Re}\!\left(\color{#00A000}{0}\,-\,\color{#C000FF}{\frac{\pi i}4}\,+\,\color{#C000FF}{\frac{\pi i}4}\right)\\[4pt]
&\small=0
\end{align}
$$
Exploitation of Periodicity
$$
\begin{align}
\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x^2-1}\,\mathrm{d}x
&=\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x-1}\,\mathrm{d}x
-\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x+1}\,\mathrm{d}x\\
&=\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}x\,\mathrm{d}x
-\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}x\,\mathrm{d}x\\[6pt]
&=0
\end{align}
$$
Best Answer
No, you cannot choose the the low half-plane of $\mathbb C$. If $z=x+yi$ with $y\leqslant0$, then$$\lvert e^{iz}\rvert=e^{\operatorname{Re}(-y+xi)}=e^{-\operatorname{Re}(y)}\geqslant1$$and, in fact, as $y$ goes to $-\infty$, $\lvert e^{iz}\rvert$ goes to $+\infty$. So, the integral along the negative semicircle most definitely will contribute to the path integral. You will not have this problem if you work with the highest half-plane.