How can I continue my proof that the difference of cosine integrals is the Euler Mascheroni constant?
Since trigonometric functions are essentially complex exponentials, one is motivated to directly study the behavior of
\begin{aligned} I(x) &=\int_0^x{1-e^{it}\over t}\mathrm dt-\int_x^\infty{e^{it}\over t}\mathrm dt \\ &=\int_0^{-ix}{1-e^{-u}\over u}\mathrm du-\int_{-ix}^{-i\infty}{e^{-u}\over u}\mathrm du \end{aligned}
where $x$ is a positive real number. To handle the first integral, we can use Cauchy's theorem to conclude
$$ \int_0^{-ix}{1-e^{-u}\over u}\mathrm du=\int_0^1{1-e^{-u}\over u}\mathrm du+\log(-ix)-\int_1^{-ix}{e^{-u}\over u}\mathrm du $$
Plugging this back in, we have
$$ I(x)=\log(-ix)+\int_0^1{1-e^{-u}\over u}\mathrm du-\left(\int_1^{-ix}+\int_{-ix}^{-i\infty}\right){e^{-u}\over u}\mathrm du $$
Now it remains to simplify the latter contour integral. Again, we can use Cauchy's theorem to conclude that it is equal to
$$ \int_1^{-i\infty}{e^{-u}\over u}\mathrm du=\lim_{T\to+\infty}\int_1^{-iT}{e^{-u}\over u}\mathrm du $$
To compute the complex integral, we construct a fan-shape contour so that the segment $[1,-iT]$ is joined by the segument $[1,T]$ and an arc $C_T$ connecting $-iT$ and $T$. Applying Cauchy's theorem, we get
$$ \int_1^{-iT}{e^{-u}\over u}\mathrm du=\left(\int_1^T{e^{-u}\over u}+\int_{C_T}\right){e^{-u}\over u}\mathrm du $$
If we write $u=Te^{i\theta}$, then we can see that on $C_T$ the integrand satisfies
$$ \left|{e^{-u}\over u}\right|\le{e^{-T\cos\theta}\over T} $$
Now, by mean value theorem for integrals we conclude that there exists $\varepsilon>0$ such that
$$ \int_{C_T}{e^{-u}\over u}\mathrm du=\mathcal O(e^{-\varepsilon T}) $$
Letting $T\to+\infty$, we obtain
$$ I(x)=\log(-ix)+\underbrace{\int_0^1{1-e^{-u}\over u}\mathrm du-\int_1^\infty{e^{-u}\over u}\mathrm du}_\gamma $$
Taking real components on both sides gives the desire conclusion. Hope this proof can help!