I'm stuck on this problem. Here $a,b\in\mathbb{N}$ with $b>a$. I have already shown that
$$-\lim_{\varepsilon\searrow 0}\int_{|t|>\varepsilon}\frac{\coth(\pi t)}{(it+a)(it+b)}dt=\frac{i}{ab}+\frac{2i}{b-a}\sum_{a<k\leq b}\frac{1}{k}.$$
I am supposed to derive from this that
$$\int_{-\infty}^\infty\frac{t}{(a^2+t^2)(b^2+t^2)(e^{2\pi t}-1)}dt=\frac{1}{2ab(a+b)}+\frac{1}{b^2-a^2}\sum_{a<k\leq b}\frac{1}{k}.$$
I can see that the one integral relates to the other, but I'm not sure how to go from the first to the second (or vice versa for that matter). I've written $\coth(\pi t)=1+\frac{2}{e^{2\pi t}-1}$ and multiplied the numerator and denominator with $(-it+a)(-it+b)$ to get the $(a^2+t^2)(b^2+t^2)$, but it only seems to lead to multiple complicated integrals, that I can't evaluate.
Hopefully someone can give me a hint or a substep or so, such that I can then continue myself. Please don't give full solutions.
Thank you in advance!
I also had another question regarding the first limit (which isn't for the above problem, but it got me confused). When I enter the integral $$\int_{-\infty}^\infty\frac{\coth(\pi t)}{(it+a)(it+b)}dt$$ into Mathematica, it says it diverges. But isn't $$\lim_{\varepsilon\searrow 0}\int_{|t|>\varepsilon}\frac{\coth(\pi t)}{(it+a)(it+b)}dt=\int_{-\infty}^\infty\frac{\coth(\pi t)}{(it+a)(it+b)}dt?$$
For the first question (Hint only)
Just re-express both integrals as one over positive $t$.
$$ \require{action} \toggle{ \color{red}{\verb/Click this for more hint/} }{ \begin{align}\frac{1}{(a+it)(b+it)} - \frac{1}{(a-it)(b-it)} &= \frac{-2it(a+b)}{(a^2+t^2)(b^2+t^2)}\\\frac{1}{e^{2\pi t}-1} - \frac{1}{e^{-2\pi t}-1} &= \coth(\pi t)\end{align} }\endtoggle $$
For the second question
For small $t$, $\coth(t)$ behaves like $\displaystyle\;\frac{1}{t}\;$. Integrals of the form $$\int_\epsilon^\Lambda f(t) \coth(t) dt \quad\text{ and/or }\quad \int_{-\Lambda'}^{-\epsilon} f(t)\coth(t)dt $$ where $f(t)$ continuous and non-zero at $t = 0$ will diverge logarithmically as $\epsilon \to 0$.
However, $\displaystyle\;\frac{1}{t}$ is an odd function. If one avoid the pole at $0$ symmetrically, one can continue to extract meaningful number from integrals of the form
$$\left(\int_{\epsilon}^\Lambda + \int_{-\Lambda'}^{-\epsilon}\right) f(t)\coth(t) dt$$
as $\epsilon \to 0$. This is called the Cauchy principal value of such integrals.