The problem lies with the fact that the cosine blows up along a semicircle in the upper or lower half plane. To do this correctly, you can break the cosine into complex exponentials, each of which satisfies Jordan's lemma on one or the other semicircular contour, as I demonstrate below.
Because cosine is even, we may assume that $\omega > 0$. Rewrite the integral as
$$\frac12 \int_{-\infty}^{\infty} dx \frac{e^{i \omega x} + e^{-i \omega x}}{x^2+25} $$
Break the integral in two. Now first consider the following contour integral
$$\oint_{C_+} dz \frac{e^{i \omega z}}{z^2+25} $$
where $C_+$ is a semicircle of radius $R$ in the upper half-plane. The contour integral is equal to
$$\int_{-R}^R dx \frac{e^{i \omega x}}{x^2+25} + i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{-\omega R \sin{\theta}} e^{i \omega R \cos{\theta}}}{R^2 e^{i 2 \theta}+25} $$
As $R \to \infty$ the second integral has a magnitude bounded from above by
$$\frac{2}{R} \int_0^{\pi/2} d\theta \, e^{-\omega R \sin{\theta}} \le \frac{2}{R} \int_0^{\pi/2} d\theta \, e^{-2 \omega R \theta/\pi} \le \frac{\pi}{2 \omega R^2} $$
Thus the second integral vanishes as $R \to \infty$. By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=5 i$. Therefore,
$$\int_{-\infty}^{\infty} dx \frac{e^{i \omega x}}{x^2+25} = i 2 \pi \frac{e^{i \omega (5 i)}}{2 \cdot 5 i} = \frac{\pi}{5} e^{-5 \omega}$$
Now consider the following contour integral:
$$\oint_{C_-} dz \frac{e^{-i \omega z}}{z^2+25} $$
where $C_-$ is a semicircle of radius $R$ in the lower half-plane. The contour integral is equal to
$$\int_{R}^{-R} dx \frac{e^{-i \omega x}}{x^2+25} + i R \int_{\pi}^{2 \pi} d\theta \, e^{i \theta} \frac{e^{\omega R \sin{\theta}} e^{-i \omega R \cos{\theta}}}{R^2 e^{i 2 \theta}+25} $$
Note that $\sin{(\pi+\theta)}=-\sin{\theta}$. As $R \to \infty$ the second integral has a magnitude bounded from above by
$$\frac{2}{R} \int_0^{\pi/2} d\theta \, e^{-\omega R \sin{\theta}} \le \frac{2}{R} \int_0^{\pi/2} d\theta \, e^{-2 \omega R \theta/\pi} \le \frac{\pi}{2 \omega R^2} $$
Thus the second integral vanishes as $R \to \infty$. By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue at the pole $z=-5 i$. Therefore,
$$-\int_{-\infty}^{\infty} dx \frac{e^{i \omega x}}{x^2+25} = i 2 \pi \frac{e^{-i \omega (-5 i)}}{2 \cdot (-5 i)} = -\frac{\pi}{5} e^{-5 \omega}$$
Therefore, putting this all together, and considering the fact that the integrand is even with respect to $\omega$, we have
$$\int_{-\infty}^{\infty} dx \frac{\cos{\omega x}}{x^2+25} =\frac{\pi}{5} e^{-5 |\omega|}$$