Herein, we present an approach that uses contour integration. To that end we now proceed.
Without loss of generality, we will assume that $a>0$ and $b>0$.
First, note that the integral of interest can be written
$$\int_0^\infty \frac{\sin(ax)}{\sinh(bx)}\,dx=\frac12\text{Im}\left(\text{PV}\int_{-\infty}^\infty \frac{e^{iaz}}{\sinh(bz)}\,dz\right)$$
where $\text{PV}$ denotes the Cauchy Principal Value.
Next, we analyze the contour integral $\displaystyle \oint_C \frac{e^{iaz}}{\sinh(bz)}\,dz$, where $C$ is the contour comprised of $(1)$ the real line segment from $-(N+1/2)\frac\pi b$ to $-\epsilon$, $(2)$ the semi-circular arc $z=\epsilon e^{i\phi}$, $\phi\in[-\pi,0]$, $(3)$ the real line segment from $\epsilon$ to $(N+1/2)\frac\pi b$, and $(4)$ the semi-circular arc $z=(N+1/2)\frac\pi b e^{i\phi}$, $\phi\in[0,\pi]$.
Using the residue theorem, we have
$$\begin{align}
\oint_C \frac{e^{iaz}}{\sinh(bz)}\,dz&=2\pi i \left(\sum_{n=1}^N \frac1b(-1)^n e^{-n\pi b/a}\right)\\\\
&=-2\pi i \left(\frac1b\,\frac{e^{-\pi a/b}}{1+e^{-\pi a/b}}\right)
\end{align}$$
As $N\to \infty$ and $\epsilon \to 0$ we find that
$$\begin{align}
\text{PV}\int_{-\infty }^\infty \frac{e^{iax}}{\sinh(bx)}\,dx&=i\frac{\pi}{b}\left(1-2\frac{e^{-\pi a/b}}{1+e^{-\pi a/b}}\right)\\\\
&=i\frac{\pi}{b}\left(\tanh\left(\frac{\pi a}{2b}\right)\right)\tag 1
\end{align}$$
Taking the imaginary part of $(1)$ and dividing by $(2)$ yields
$$\bbox[5px,border:2px solid #C0A000]{\int_0^\infty \frac{\sin(ax)}{\sinh(bx)}\,dx=\frac{\pi }{2b}\tanh\left(\frac{\pi a}{2b}\right)}$$