Let $f_\tau(t)=\frac {\sin t \tau}{e^{t/2}-e^{-t/2}}$ and show that $I :=\int_{-\infty}^\infty f_\tau(t)\,dt = \pi \tanh \pi \tau$.
My attempt:
Consider the integral $\int_R f_\tau(t)\,dt$ over a large rectangle $R$ over the complex numbers going from $-K$ to $K$ to $K+4\pi i$ to $-K+4\pi i$ to $-K$ and let $K\rightarrow \infty$.
Since $f_\tau(t)$ has poles at $0, 2\pi i, 4\pi i$, we have that $$\int_R f_\tau(t)\,dt = \frac 1 2(\operatorname{res}_{0}f_\tau(t) + \operatorname{res}_{4\pi i}f_\tau(t)) + \operatorname{res}_{2\pi i}f_\tau(t).$$
Since the integrals over the vertical sides go to zero,
$$I - \int \frac {e^{-4\pi \tau}e^{it\tau}-e^{4\pi\tau}e^{-it\tau}}{e^{t/2}-e^{-t/2}}\,dt=\frac 1 2(\operatorname{res}_{0}f_\tau(t) + \operatorname{res}_{4\pi i}f_\tau(t)) + \operatorname{res}_{2\pi i}f_\tau(t).$$
Moreover,
$$\operatorname{res}_{0}f_\tau(t) = \lim_{t\rightarrow 0}\,(t-0)\frac{\sin t\tau}{e^{t/2}-e^{-t/2}} = 0.$$
If I am on the right path, I'd like to ask for a hint for the calculation of the other two residues and the integral over the top of the rectangle.
\begin{align} I &= \int_{-\infty}^{+\infty}dt\,\frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}}\\ &= \int_{-\infty}^{+\infty}dt\,\frac{1}{2i}\frac{e^{it\tau}}{\sinh(t/2)} \end{align}
The function $$ g_{\tau}(t) = \frac{1}{2i}\frac{e^{it\tau}}{\sinh(t/2)} $$ has poles at $t_n = 2\pi i n$ for all integers $n$. The residue at $t = t_n$ can be calculated as: \begin{align} Res\{2\pi i n\} &=\lim_{t\rightarrow 2\pi i n} \frac{1}{2i} \frac{(t - 2\pi i n)\,e^{i t \tau}}{2 \sinh(t/2)}\\ &= \lim_{t\rightarrow 2\pi i n} \frac{1}{2i}\frac{(t - 2\pi i n)\,e^{-2\pi n \tau}}{\sinh(\pi i n) + \frac{1}{2}\cosh(\pi i n)(t - 2\pi i n)\,+\,...}\\ &= \lim_{t\rightarrow 2\pi i n} \frac{1}{2i}\frac{(t - 2\pi i n)\,e^{-2\pi n \tau}}{0 + \frac{1}{2}{(-1)}^n(t - 2\pi i n)\,+\,...}\\ &=\frac{1}{i} {(-1)}^ne^{-2\pi n \tau} \end{align} In the second line above, I have taken a Taylor series around $t = 2\pi i n$ to the necessary number of terms on the bottom.
For $\tau>0$ take a contour enclosing the upper half complex plane. This contour encloses all the poles with $n>0$, and passes through the $n=0$ pole at $t = 0$. The $t=0$ pole contributes half its residue to the integral. The value of the integral is thus: \begin{align} I &= 2\pi i \left(\sum_{n = 1}^{\infty} Res\{2\pi i n\}\;+\; \frac{1}{2}Res\{0\}\right)\\ &= 2\pi i \left(\sum_{n = 1}^{\infty} \frac{1}{i} {(-1)}^n e^{-2\pi n \tau} + \frac{1}{2}\frac{1}{i}\right)\\ &= \pi + 2\pi\sum_{n = 1}^{\infty} {(-1)}^n e^{-2\pi n \tau}\\ &= \pi - 2\pi \frac{e^{-2\pi n \tau}}{1+e^{-2\pi n \tau}}\\ &= \pi \tanh(\pi \tau) \end{align}
For $\tau<0$ the same procedure - except with a contour enclosing the lower half of the complex plane - yields the same result.
Edited to add:
Here's another method. $$ \frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}} = \frac{e^{-t/2}\sin(t\tau)}{1-e^{-t}} = e^{-t/2}\sin(t\tau)\sum_{n = 0}^\infty e^{-nt} $$ Thus: \begin{align} I &= 2\int_0^{\infty}dt\, \frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}}\\ &=2\sum_{n=0}^{\infty}\int_0^{\infty}dt\,e^{-(n+\frac{1}{2})t} \sin(t\tau)\\ &=2\sum_{n=0}^{\infty} \frac{\tau}{\tau^2+{(n+\frac{1}{2})}^2}\\ &=\sum_{n=-\infty}^{\infty} \frac{\tau}{\tau^2+{(n+\frac{1}{2})}^2} \end{align}
This final sum can be evaluated in various ways, such as by the Poisson summation formula, to yield $I = \pi\tanh(\pi\tau)$.