$$I=\int_{-\infty}^{+\infty}f(x)\,dx=\int_{-\infty}^{+\infty} \frac{\cos(x)}{\exp(x^2)}\,dx$$
I tried using the Limit comparison for this one:
$$f(x)\leq g(x) = e^{-x^2}$$
Now I can take the integral of $g(x)$. But my problem are the limits $-\infty$ and $+\infty$. How am I supposed to solve this in order to show the convergence? If possible I want to calculate the real value for my integral, i.e. what it converges to.
The integral is absolutely convergent by your bound, and:
$$ I = \int_{0}^{+\infty}\frac{\cos(\sqrt{x})}{\sqrt{x}}\,e^{-x}\,dx.\tag{1}$$ By expanding $$ \frac{\cos(\sqrt{x})}{\sqrt{x}}=\sum_{n=0}^{+\infty}\frac{(-1)^n x^{n-\frac{1}{2}}}{(2n)!}\tag{2}$$ and integrating termwise through: $$ \int_{0}^{+\infty} x^{n-\frac{1}{2}}e^{-x}\,dx = \Gamma\left(n+\frac{1}{2}\right)\tag{3}$$ we get, through the Legendre duplication formula: $$ \color{red}{I} = \sum_{n\geq 0}\frac{(-1)^n\, \Gamma\left(n+\frac{1}{2}\right)}{\Gamma(2n+1)}=\Gamma\left(\frac{1}{2}\right)\sum_{n\geq 0}\frac{(-1)^n }{4^n\,n!}=\color{red}{\sqrt{\pi}\,e^{-1/4}}\tag{5}$$ and along the same lines we may also prove: $$ \mathcal{L}\left(\frac{\cos\sqrt{x}}{\sqrt{x}}\right) = \sqrt{\frac{\pi}{s}} e^{-\frac{1}{4s}}.\tag{6}$$