An integral identity $\newcommand\la\lambda\newcommand\w{\mathfrak w}\newcommand\R{\mathbb R}$Numerical calculations and other considerations (The min of the mean of iid exponential variables) suggest that
$$\int_\R \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}$$
for $u\in(0,1)$, with the integral understood in the principal value sense. However, I have not been able to prove this, even with the help of Mathematica.
How can this be proved?
 A: $\newcommand\eps\varepsilon$ We want to show that, under $R\to\infty$ and $\eps\to 0+$, we have
$$\int_{(-R,-\eps)\cup(\eps,R)} \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$
Equivalently,
$$\int_{(-R,-\eps)\cup(\eps,R)}\left(\frac{1-e^{itu}}{e^{itu}-1-it}+1\right)\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$
In other words,
$$\int_{(-R,-\eps)\cup(\eps,R)}\frac{dt}{e^{itu}-1-it}=\pi\,\frac u{u-1}+o(1).$$
The integrand is holomorphic in an open set containing $\{t\in\mathbb{C}:\text{$\Im(t)\geq 0$ and $t\neq 0$}\}$, hence by Cauchy's theorem it suffices to show that
$$\int_{\gamma(R)}\frac{dt}{e^{itu}-1-it}=-\pi+o(1)\qquad\text{and}\qquad
\int_{\gamma(\eps)}\frac{dt}{e^{itu}-1-it}=\frac{\pi}{u-1}+o(1),$$
where $\gamma(r)$ is the semicircle in $\{t\in\mathbb{C}:\Im(t)\geq 0\}$ going from $r$ to $-r$. For large $r$, the integrand on $\gamma(r)$ is $i/t+O(1/t^2)$. For small $r$, the integrand on $\gamma(r)$ is $-i/(t(u-1))+O_u(1)$. The result follows.
A: I would close the contour in the upper half of the complex plane, the principal value picks up $i\pi$ times the residue$^\ast$ at $t=0$, which is $u/(1-u)$. There are no other poles.$^{\ast\ast}$
$^\ast$ $\frac{1-e^{i t u}}{e^{i t u}-i t-1}=\frac{u}{1-u}+{\cal O}(t^2).$
$^{\ast\ast}$ poles are at $t=i\tau$ with $e^{-\tau u}+\tau=1$ (excluding $\tau=0$, which is canceled by the numerator); these remain at $\tau<0$ for all $u\in(0,1)$, approaching $-2(1-u)$ for $u\rightarrow 1$.

In the comments there was an issue with the numerical evaluation. Principal value integrals of this type can be evaluated more accurately by replacing $1/t$ by $\frac{d\log |t|}{dt}$ and carrying out a partial integration. This gives
$$\int_{-\infty}^\infty dt\,\frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{1}t=
-2i\Im\int_{0}^\infty dt\,\ln|t|\frac{d}{dt}\frac{1-e^{itu}}{e^{itu}-1-it}.$$
For the case $u=1/2$ considered in the comments, Mathematica gives 3.1406.
A: This is to detail Carlo Beenakker's assertion about the poles of the integrand. Suppose that $t=x+iy$ is such a pole, where $x$ and $y$ are real. Then
$$1-y=e^{-uy}\cos ux,\quad x=e^{-uy}\sin ux.$$
Suppose that $y>0$. If $x=0$ then $1-y=e^{-uy}\ge1-uy$, so that $(u-1)y\ge0$, which contradicts the conditions $y>0$ and $u\in(0,1)$. So, $x\ne0$ and hence
$$\frac{\sin ux}{ux}=\frac{e^{uy}}u>1,$$
which contradicts the inequality $\frac{\sin v}{v}\le1$ for all real $v\ne0$.
So, $y\le0$.
If now $y=0$ then $1=\cos ux$ and hence $x=\sin ux=0$.
Thus, the only pole $x+iy$ with $y\ge0$ is $0$.
