Prove that $\int_{-\infty}^\infty \frac {\sin t \tau}{e^{t/2}-e^{-t/2}}\,dt = \pi \tanh \pi \tau$

$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $$ \bbox[#fee,5px,border:2px groove navy]{\quad% \mbox{Hereafter, we evaluate the integral without using the Residue Theorem.}\quad} $$

$\ds{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t = \pi\tanh\pars{\pi\tau}:\ ?}$.

\begin{align} \color{#f00}{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t} & = 2\int_{0}^{\infty}{\sin\pars{\tau t}\expo{-t/2} \over 1 - \expo{-t}}\,\dd t = 2\sum_{n = 0}^{\infty}\, \Im\int_{0}^{\infty}\expo{-\pars{n + 1/2 - \tau\,\ic}t}\,\,\,\,\dd t \\[5mm] & = -\ic\sum_{n = 0}^{\infty}\, \pars{{1 \over n + 1/2 - \tau\,\ic} - {1 \over n + 1/2 + \tau\,\ic}}\dd t \\[5mm] & = -\ic\bracks{\Psi\pars{\half + \tau\,\ic} - \Psi\pars{\half - \tau\,\ic}}\qquad \pars{~\Psi:\ Digamma\ Function~} \end{align} With Euler Reflection Formula: $$ \color{#f00}{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t} = -\ic\braces{\pi\cot\pars{\pi\bracks{\half - \tau\,\ic}}} = \color{#f00}{\pi\tanh\pars{\pi\tau}} $$


For a rectangular-like contour, consider

$$\oint_C dz \frac{\sin{\tau z}}{\sinh{(z/2)}} $$

where $C$ is the rectangle with vertices $-R$, $R$, $R+i 2 \pi$, $-R+i 2 \pi$, modified by a semicircular detour around $z=i 2 \pi$ of radius $\epsilon$. The contour integral is therefore

$$\int_{-R}^R dx \frac{\sin{\tau x}}{\sinh{(x/2)}} + i \int_0^{2 \pi} dy \frac{ \sin{\tau (R+i y)}}{\sinh{((R+i y)/2)}} \\ - PV \int_{-R}^R dx \frac{\sin{\tau (x+i 2 \pi)}}{\sinh{(x/2+i \pi)}} + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{\sin{\tau (\epsilon e^{i \phi}+ i 2 \pi)}}{\sinh{(\epsilon e^{i \phi}/2+i \pi)}} \\- i \int_0^{2 \pi} dy \frac{ \sin{\tau (-R+i y)}}{i \sinh{((-R+i y)/2)}} $$

In the limit as $R \to \infty$ the second and fifth integrals vanish. The contour integral then becomes in this limit and the limit $\epsilon \to 0$,

$$\left [1+\cosh{(2 \pi \tau)} \right ] \int_{-\infty}^{\infty} dx \frac{\sin{\tau x}}{\sinh{(x/2)}} + i \sinh{(2 \pi \tau)} PV \int_{-\infty}^{\infty} dx \frac{\cos{\tau x}}{\sinh{(x/2)}} - 2 \pi \sinh{2 \pi \tau} $$

The integral over cosine vanishes due to symmetry. Further, by Cauchy's theorem, the contour integral vanishes. Thus,

$$\int_{-\infty}^{\infty} dx \frac{\sin{\tau x}}{\sinh{(x/2)}} = 2 \pi \frac{\sin{2 \pi \tau}}{1+\cos{2 \pi \tau}} = 2 \pi \tanh{\pi \tau}$$

The stated result follows.