Solution (source code)

= Solution

At $x=0$, both denominators are nonzero because $a\notin2\pi\mathbb Z$; they remain nonzero for every real $x\geq0$. The integrand is therefore bounded on each finite interval. At infinity its terms decay respectively as $O(e^{-(1+b)x})$ and $O(e^{-(1-b)x})$, so $0<b<1$ gives <absolute convergence>.

Set $t=e^{-x}$. The two integrals become
$$
I(a,b)=e^{-ia}\int_0^1\frac{t^b}{1-e^{-ia}t}\,dt
-e^{ia}\int_0^1\frac{t^{-b}}{1-e^{ia}t}\,dt.
$$
By the <Euler integral for the hypergeometric function> and the <Gamma function recurrence>, $\int_0^1t^{s-1}/(1-zt)\,dt={}_2F_1(1,s;s+1;z)/s$ for $s>0$ and the indicated unit-circle values $z\ne1$. Hence
$$
\boxed{I(a,b)=\frac{e^{-ia}}{1+b}{}_2F_1(1,1+b;2+b;e^{-ia})
-\frac{e^{ia}}{1-b}{}_2F_1(1,1-b;2-b;e^{ia}).}
$$
The <Gauss hypergeometric functions> here use their continuation from the Euler integral, so no pole crosses the integration interval.