$$I= \int_{0}^{\infty} e^{-\beta w}\left(\frac{1}{w}-\operatorname{coth}(w)\right) d w $$
Now, from the definition of $\operatorname{coth}(w)$
$$\operatorname{coth}(w)=\frac{e^{w}+e^{-w}}{e^{w}-e^{-w}} $$
$$\operatorname{coth}(w)=\frac{e^{-w}}{e^{-w}} \cdot \frac{e^{w}+e^{-w}}{e^{w}-e^{-w}} $$
$$\operatorname{coth}(w)=\frac{1+e^{-2 w}}{1-e^{-2 w}}$$
Plugging this last result in the integral
$$I= \int_{0}^{\infty} e^{-\beta w}\left(\frac{1}{w}-\frac{1+e^{-2 w}}{1-e^{-2 w}}\right) d w$$
Lets do another substitution, $$w=\frac{x}{2}$$
$$I= \int_{0}^{\infty} e^{-\frac{\beta x}{2 }}\left(\frac{2}{x}-\frac{1+e^{-x}}{1-e^{-x}}\right) \frac{d x}{2} $$
$$I= \int_{0}^{\infty} e^{-\frac{\beta x}{2 }}\left(\frac{1}{x}-\frac{1}{2} \cdot \frac{1+e^{-x}}{\left(1-e^{-x}\right)}\right) d x $$
$$I=\int_{0}^{\infty}\left\{\frac{e^{-\frac{\beta x}{2 }}}{x}-\frac{e^{-\frac{\beta x}{2 }}+e^{-\frac{\beta x}{2 }} e^{-x}}{2\left(1-e^{-x}\right)}\right\} d x $$
$$I= \int_{0}^{\infty}\left\{\frac{e^{-\frac{\beta x}{2 }}+e^{-x}-e^{-x}}{x}-\frac{e^{-\frac{\beta x}{2 }}+e^{-\frac{\beta x}{2 }}-e^{-\frac{\beta x}{2 }}+e^{-\frac{\beta x}{2 }} e^{-x}}{2\left(1-e^{-x}\right)}\right\} d x$$
We now rewrite this integral as the sum of three integrals:
$$I=\int_{0}^{\infty} \frac{e^{-x}}{x}-\frac{2 e^{-\frac{\beta x}{2 }}}{2\left(1-e^{-x}\right)} d x+\int_{0}^{\infty} \frac{e^{-\frac{\beta x}{2 }}-e^{-\frac{\beta x}{2 }} e^{-x}}{2\left(1-e^{-x}\right)} d x+\int_{0}^{\infty} \frac{e^{-\frac{\beta x}{2 }}-e^{-x}}{x} d x$$
$$I=\int_{0}^{\infty} \frac{e^{-x}}{x}-\frac{e^{-\frac{\beta x}{2 }}}{\left(1-e^{-x}\right)} d x+\frac{1}{2} \int_{0}^{\infty} e^{-\frac{\beta x}{2 }} d x-\int_{0}^{\infty} \frac{e^{-x}-e^{-\frac{\beta x}{2 }}}{x} d x $$
the first integral is the integral representation of the Digamma function $\psi(\frac{\beta}{2})$
the third is Frullani's integral representation of
$\log \left(\frac{\beta}{2}\right)$
The second integral is straightforward:
$$\frac{1}{2} \int_{0}^{\infty} e^{-\frac{\beta x}{2 }} d x=\frac{1}{2}\left[-\left.\frac{2}{\beta} e^{-\frac{\beta x}{2 }}\right|_{0} ^{\infty}\right]=\frac{1}{\beta}$$
Putting all together we finally get that
$$\boxed{I= \int_{0}^{\infty} e^{-{\beta w}}\left(\frac{1}{w}-\operatorname{coth}(w)\right) d w=\frac{1}{\beta}+\psi\Big(\frac{\beta}{2}\Big)-\log \Big(\frac{\beta}{2}\Big)}$$