Setting $I_{a,b} $ equal to the original integral and assuming $b > 0$, we get, with your substitution $b\tan(x) = u-a$,
$$\begin{split}
I_{a,b} &= \frac 1b \int_{-\infty}^{+\infty} \cos^4(x) \cos(u) \mathop{}\!du = \frac 1b \int_{-\infty}^{+\infty} \frac{\cos(u) \mathop{}\! du}{\sec^4(x)} = \frac1 b\int_{-\infty}^{+\infty} \frac{\cos(u)\mathop{}\! du}{(1+\tan^2(x))^2} \\
&= \frac 1 b \int_{-\infty}^{+\infty} \frac{b^4\cos(u)\mathop{}\!du}{(b^2 + (u-a)^2)^2} = b^3 \int_{-\infty}^{+\infty} \frac{\cos(s+a) \mathop{}\!ds}{(b^2 + s^2)^2} = \int_{-\infty}^{+\infty} \frac{\cos(bt + a)}{(1+t^2)^2}dt.
\end{split}$$
The last integral can be solved in two ways:
Direct contour integration. Consider the complex integral
$$J_{a,b} = \lim_{r\to\infty} e^{ia}\int_{\Gamma_r} \frac{e^{ibz}}{(1 + z^2)^2}\mathop{}\!dz \tag 1$$
where the closed contour $\Gamma_r = [-r,r] \cup \gamma_{0,r,\curvearrowleft}$ indicates the concatenation of a segment of length $2r$ lying on the real line and a semicircle lying in the upper half-plane. The integral can be split into two components,
$$\int_{\Gamma_r} \frac{e^{ibz}}{(1 + z^2)^2}\mathop{}\!dz = \int_{[-r,r]} \frac{e^{ibz}}{(1 + z^2)^2}\mathop{}\!dz + \int_{\gamma_{0,r,\curvearrowleft}} \frac{e^{ibz}}{(1 + z^2)^2}\mathop{}\!dz, $$
and since the second integral vanishes thanks to the Jordan lemma, we are led to
$$J_{a,b} = \lim_{r\to\infty} \int_{[-r,r]} \frac{e^{i(bz+a)}}{(1+z^2)^2} \mathop{}\!dz = \lim_{r\to\infty} \int_{-r}^r \frac{e^{i(bt+a)}}{(1+t^2)^2} \mathop{}\!dt = \int_{-\infty}^{+\infty} \frac{e^{i(bt+a)}}{(1+t^2)^2} \mathop{}\!dt, $$
whence it is clear that $$\operatorname{Re}(J_{a,b}) = I_{a,b}. \tag2$$
Applying the residue theorem to the integral in $(1)$ entails
$$\begin{split}
J_{a,b} &= e^{ia} \lim_{r\to\infty} \left(2\pi i \operatorname*{Res}\limits_{z=i} \frac{e^{ibz}}{(1 + z^2)^2} \right) \\
&= 2\pi i\ e^{ia} \left( -\frac{b+1}{4e^b}i \right) = \frac \pi 2 e^{ia} \frac{b+1}{e^b},
\end{split}$$
and by $(2)$ we obtain
$$I_{a,b} = \boxed{ \frac \pi 2 \cos(a) \frac{b+1}{e^b}} $$
The Feynman trick, then contour integration. Let us introduce the following parameter-dependent integral:
$$ K_{a,b}(\lambda) = \int_{-\infty}^{+\infty} \frac{\cos(bt+a)}{\lambda^2 + t^2} \mathop{}\!dt. $$
Differentiating w.r.t. $\lambda$ yields
$$K_{a,b}'(\lambda)=\frac{dK_{a,b}}{d\lambda}(\lambda) = \int_{-\infty}^{+\infty} \frac{\partial}{\partial\lambda} \left(\frac{\cos(bt+a)}{\lambda^2 + t^2}\right) \mathop{}\!dt = -2\lambda \int_{-\infty}^{+\infty} \frac{\cos(bt+a)}{(\lambda^2 + t^2)^2} \mathop{}\!dt. $$
By a procedure which is almost identical to the one seen above, we may calculate
$$K_{a,b}(\lambda) = \operatorname{Re} \left( 2\pi i\ e^{ia} \operatorname*{Res}\limits_{z=\lambda i} \frac{e^{ibz}}{\lambda^2 + z^2} \right) = \operatorname{Re}\left(2\pi i\ e^{ia} \frac{-i}{2\lambda e^{b \lambda}} \right) = \pi \frac{\cos(a)}{\lambda e^{b\lambda}} ,$$
so that
$$K_{a,b}'(\lambda) = - \pi\cos(a) \frac{e^{-b\lambda} (b\lambda +1)}{\lambda^2}. $$
We conclude by observing
$$ I_{a,b} = -\frac 1 2 K'_{a,b}(1) = \boxed{ \frac \pi 2 \cos(a) \frac{b+1}{e^{b}}} $$