On an infinite harmonic series. Let $n \in \mathbb{N}$ and let $\mathcal{H}_m$ denote the $m$-th harmonic number. Evaluate in a closed form the sum
$$\mathcal{S}_n = \sum_{m=1}^{\infty} \mathcal{H}_m \left ( \frac{1}{m+1} - \frac{1}{m+n+2} \right )$$
I do not know how to tackle this. My instict tells me that there should be a telescopic sum somewhere inside but I cannot figure it out. The sum should calculate to
$$\mathcal{S}_n = \frac{\mathcal{H}_{n+1}^2 + \mathcal{H}_{n+1}^{(2)}}{2}$$
(where $\mathcal{H}^{(2)}_m$ is the $m$-th generalized harmonic number of order $2$) since this particular series comes from evaluating the integral
$$\mathcal{J}_n = \int_0^1 x^n \log^2(1-x) \, \mathrm{d}x$$
Any help finishing $\mathcal{S}_n$?

It seems I got preempted by a comment, but since nobody has posted an answer, I see no reason to not post my own answer, though it does use a very similar method.
First, we let
$$T_n=\frac{1}{2}[H_{n+1}^2+H^{(2)}_{n+1}]$$
We see that for $n\geq 0$,
\begin{equation}
\begin{split}
T_n-T_{n-1}&=\frac{1}{2}[H_{n+1}^2-H_n^2+H_{n+1}^{(2)}-H_{n}^{(2)}]\\
&=\frac{1}{2}[(H_{n+1}-H_n)(H_{n+1}+H_n)+H_{n+1}^{(2)}-H_{n}^{(2)}]\\
&=\frac{1}{2}\left[\frac{1}{n+1}\left(2H_{n+1}-\frac{1}{n+1}\right)+\frac{1}{(n+1)^2}\right]\\
&=\frac{H_{n+1}}{n+1}
\end{split}
\end{equation}
and furthermore,
\begin{equation}
\begin{split}
S_n-S_{n-1}&=\sum_{m=1}^\infty\left[\frac{H_m}{m+n+1}-\frac{H_m}{m+n+2}\right]\\
&=\sum_{m=1}^\infty\left[\frac{H_m}{m+n+1}-\frac{H_{m+1}}{m+n+2}+\frac{1}{(m+n+2)(m+1)}\right]\\
&=\sum_{m=1}^\infty\left[\frac{H_m}{m+n+1}-\frac{H_{m+1}}{(m+1)+n+1}\right]+\frac{1}{n+1}\sum_{m=1}^\infty\left[\frac{1}{m+1}-\frac{1}{(m+n+1)+1}\right]\\
\end{split}
\end{equation}
Notice that both series exhibit telescoping-like behaviour, so
$$\sum_{m=1}^\infty\left[\frac{H_m}{m+n+1}-\frac{H_{m+1}}{(m+1)+n+1}\right]=\frac{H_1}{n+2}=\frac{1}{n+2}$$
and furthermore,
$$\sum_{m=1}^\infty\left[\frac{1}{m+1}-\frac{1}{(m+n+1)+1}\right]=\sum_{m=1}^{n+1}\frac{1}{m+1}=H_{n+2}-1$$
Therefore,
$$S_n-S_{n-1}=\frac{1}{n+2}+\frac{H_{n+2}-1}{n+1}=\frac{H_{n+1}}{n+1}$$
We have proven that $T_n$ and $S_n$ satisfy the same recurrence relation, and since $T_{-1}=0=S_{-1}$, then $T_n=S_n$ for all $n\geq -1$, as desired.
Please do ask if anything needs clarification.
