Verifying the integral: $$\int_0^{\infty}\dfrac{\cos{ax}}{1+x^4}dx$$
I started considering: $$\cos{x}=\dfrac{e^{ix}+e^{-ix}}{2}\implies \cos{ax}=\dfrac{e^{iax}+e^{-iax}}{2}?$$ So: $$I=\dfrac{1}{2}\cdot \int_0^{\infty}\dfrac{e^{iax}}{1+x^4}dx+\dfrac{1}{2}\cdot \int_0^{\infty}\dfrac{e^{-iax}}{1+x^4}dx=$$
$$=\dfrac{1}{2}\cdot \int_0^{\infty}\dfrac{e^{iax}}{1+x^4}dx+\dfrac{1}{2}\cdot \int_0^{-\infty}\dfrac{e^{iax}}{1+(-x)^4}d(-x)=$$
$$=\dfrac{1}{2}\cdot \int_{-\infty}^{\infty}\dfrac{e^{iax}}{1+x^4}dx$$
Let $f(z)=\dfrac{e^a}{1+z^4}=\dfrac{e^a}{(z^2+i)(z^2-i)}$, with single poles: $$z_{+1}=-\dfrac{\sqrt2}{2}+\dfrac{\sqrt2}{2}i$$ $$z_{-1}=\dfrac{\sqrt2}{2}-\dfrac{\sqrt2}{2}i$$ $$z_{+2}=\dfrac{\sqrt2}{2}+\dfrac{\sqrt2}{2}i$$ $$z_{-2}=-\dfrac{\sqrt2}{2}-\dfrac{\sqrt2}{2}i$$
Such that: $f(z)\cdot e^{iz}=\dfrac{e^{iaz}}{1+z^4}$
Then, i have seen (But dont know why) we can use the next relation:
$$2I=2\pi i \sum_{y>0}Res(f(z)\cdot e^{iz}, z_0)$$
Calculating the residues (Skipping the calculation): $$Res(f(z)\cdot e^{iz}, z_{+1})=\lim_{z\to z_{+1}} (z-z_{+1})\cdot f(z)\cdot e^{iz}=$$
$$=\dfrac{e^{ia\cdot z_{+1}}}{2\sqrt2+2\sqrt2 i}$$
$$Res(f(z)\cdot e^{iz}, z_{+2})=\lim_{z\to z_{+2}} (z-z_{+2})\cdot f(z)\cdot e^{iz}=$$
$$=\dfrac{e^{ia\cdot z_{+2}}}{-2\sqrt2+2\sqrt2 i}$$
And finaly:
$$2I=2\pi i\big( \dfrac{e^{ia\cdot z_{+1}}}{2\sqrt2+2\sqrt2 i}+\dfrac{e^{ia\cdot z_{+2}}}{-2\sqrt2+2\sqrt2 i} \big)$$
Your result is correct : $$I=\pi i\big( \dfrac{e^{ia\cdot z_{+1}}}{2\sqrt2+2\sqrt2 i}+\dfrac{e^{ia\cdot z_{+2}}}{-2\sqrt2+2\sqrt2 i} \big)$$ Bringing back $z_{+1}=\frac{\sqrt{2}}{2}(-1+i)$ and $z_{+2}=\frac{\sqrt{2}}{2}(1+i)$ into it and after some elementary transformations : $$I=\frac{\pi}{2}\exp\left(-\frac{\sqrt{2}}{2}a\right)\sin \left(\frac{\sqrt{2}}{2}a+\frac{\pi}{4}\right)$$