TITLE: A curious integral
QUESTION [10 upvotes]: The following integral has been on my mind for a while
$$\int_0^\infty \frac{\sin(x)}{e^x-1}\,\mathrm d x \tag{$\dagger$}$$

Let us indicate the integrand as $f(x)=\frac{\sin(x)}{e^x-1}$. The following are a couple of observations.

The integrand can be extended by continuity in $0$ since
$$\lim_{x\to 0}f(x)=\lim_{x\to 0}\frac{\frac{\sin(x)}{x}}{\frac{e^x-1}{x}}=1$$
This is the original reason I started playing around with this integral.
Mathematica yields the result
$$\int_0^\infty \frac{\sin(x)}{e^x-1}\,\mathrm d x=\frac{\pi}{2}\textrm{Coth}(\pi)-\frac 12 \approx 1.076674047$$
which, following numerical evidence, seems correct.
Complex analysis may be useful here, since the integrand is a holomorphic function on $\mathbb C$. I tried writing $\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$, but I was not able to find an appropriate integration contour to solve the problem.
The $-1$ in the denominator breaks the simmetry of the expression. This made most of my substitutions useless.

Can this integral be evaluated correctly, preferrably through complex analytic methods?

REPLY [3 votes]: Contour integration solution: We consider the integral
$$I = \oint_{C\left(\epsilon,R\right)} \frac{\exp(i z)dz}{\exp(z) - 1}$$
with $C\left(\epsilon,R\right)$ a rectangle from $\epsilon$ to $R$ on the real axis, from there to $R + 2\pi i$ parallel to the imaginary axis, from there to $\epsilon + 2\pi i$ parallel to the real axis, then a clockwise quarter turn with radius $\epsilon$ and center $2\pi i$ to the point $2\pi i - i\epsilon$, from there we move on the imaginary axis to the point $i\epsilon$ and then we take a clockwise quarter turn with radius $\epsilon$ and center the origin to move back to the starting point at $\epsilon$.
The integrand is analytic inside the contour, therefore $I = 0$. The sum of the two parts parallel to the real axis is:
$$I_r = \left[1-\exp(-2\pi)\right]\int_\epsilon^R  \frac{\exp(i x)dx}{\exp(x) - 1}$$
So, the desired integral will follow from the imaginary part of $I_r$. The part of the contour integral from $R$ to $R + i$ tends to zero in the limit of $R\to\infty$ so this can be disregarded. The part of the contour integral along the imaginary axis can be written as:
$$I_i = -\int_{\epsilon}^{2\pi-\epsilon}\frac{\exp(-y)\exp\left(-i \frac{y}{2}\right)}{2\sin\left(\frac{y}{2}\right)}dy$$
We then see that 
$$\lim_{\epsilon\to 0}\operatorname{Im}I_i = \frac{1-\exp(-2\pi)}{2}$$
The two quarter circles can be evaluated, we can borrow from the derivation of the residue theorem that each of them in the limit $\epsilon\to 0$ can be evaluated as $-\frac{\pi}{2} i$ times the residue at the poles that are at the centers of the quarter circles (unlike the case of a complete contour, this is only valid in the limit $\epsilon\to 0$). The residue at the pole at $z = 0$ is $1$, while the residue at $z = 2\pi i$ is $\exp(-2\pi)$. Having completed the evaluation of all parts of the contour integral, we can now equate the imaginary part of the contour integral to zero, and take the limit of $\epsilon\to 0$ and $R\to \infty$. This yields:
$$\int_0^{\infty}\frac{\sin(x)dx}{\exp(x)-1} = \frac{\pi}{2}\coth(\pi) - \frac{1}{2}$$