It is not the case that
$$
\frac{4H_n}{(n+1)(n+2)^3}=\frac{(\gamma+\psi(-z))^2}{(z+1)(z+2)^3}
$$
What is being used are the residues of $f(z)=\frac{(\gamma+\psi(-z))^2}{(z+1)(z+2)^3}$.
Using the relation
$$
\gamma+\psi(-z)=\sum_{k=0}^\infty\left(\frac1{k+1}+\frac1{z-k}\right)
$$
we get that the residue of $f(z)$ at $z=n\in\mathbb{Z}$ for $n\ge0$ is
$$
\frac{2H_n}{(n+1)(n+2)^3}-\frac{4n+5}{(n+1)^2(n+2)^4}
$$
Furthermore, we get that the residue of $f(z)$ at $z=-1$ is $0$ and at $z=-2$ is
$$
2\zeta(3)-2-\left(2-\frac{\pi^2}6\right)^2
$$
On a path that stays away from the negative integers (say more than $\frac13$ away), $|f(z)|\sim\frac{\log(|z|)^2}{|z|^4}$. Therefore, we get
$$
\lim_{R\to\infty}\int_{\gamma_R}f(z)\,\mathrm{d}z=0
$$
where $\gamma_R=Re^{2\pi i[0,1]}$. This means that the sum of the residues must be $0$. Therefore,
$$
0=2\zeta(3)-2-\left(2-\frac{\pi^2}6\right)^2+\sum_{n=0}^\infty\left(\frac{2H_n}{(n+1)(n+2)^3}-\frac{4n+5}{(n+1)^2(n+2)^4}\right)
$$
From there, he solves for $\sum\limits_{n=0}^\infty\frac{2H_n}{(n+1)(n+2)^3}$.
The Residue of $\boldsymbol{f(z)}$ at $\boldsymbol{n\in\mathbb{Z}}$ where $\boldsymbol{n\ge0}$
Consider $(\gamma+\psi(z))^2$:
$$
\small\left(1+\color{#0000FF}{\frac1z}+\frac12+\color{#0000FF}{\frac1{z-1}}+\frac13+\color{#0000FF}{\frac1{z-2}}+\dots\right)\left(1+\color{#0000FF}{\frac1z}+\frac12+\color{#0000FF}{\frac1{z-1}}+\frac13+\color{#0000FF}{\frac1{z-2}}+\dots\right)
$$
At $z=n$, the coefficient of $\frac1{(z-n)^2}$ is $1$.
At $z=n$, the coefficient of $\frac1{z-n}$ is
$$
\small2\left(1+\color{#0000FF}{\frac1n}+\frac12+\color{#0000FF}{\frac1{n-1}}+\dots+\frac1n+\color{#0000FF}{1}+\frac1{n+1}+\color{#C00000}{0}+\frac1{n+2}-\color{#0000FF}{1}+\frac1{n+3}-\color{#0000FF}{\frac12}+\dots\right)
$$
The factor of $2$ in front is because there is one $\frac1{z-n}$ in the left factor and one in the right. The red $0$ is a placeholder for the $\frac1{z-n}$ that was accounted for in the coefficient for $\frac1{(z-n)^2}$.
The blue $-1-\frac12-\dots$ cancels the black $1+\frac12+\dots$
The remainder is the blue $\frac1n+\frac1{n-1}+\frac1{n-2}+\dots+1=H_n$.
Thus, the coefficient of $\frac1{z-n}$ is $2H_n$.
The coefficient of $\frac1{z-n}$ in $f(z)$ is
$$
\color{#0000FF}{2H_n}\frac1{(n+1)(n+2)^3}+\color{#0000FF}{1}\left[\frac{\mathrm{d}}{\mathrm{d}z}\frac1{(z+1)(z+2)^3}\right]_{z=n}
$$
which is
$$
\frac{2H_n}{(n+1)(n+2)^3}-\frac{4n+5}{(n+1)^2(n+2)^4}
$$
Also, how did you get this residues idea? :
"Residue of $f(z)$ at $z=n\in\mathbb{Z}$ for $n\ge0$ is $$ \frac{2H_n}{(n+1)(n+2)^3}-\frac{4n+5}{(n+1)^2(n+2)^4} $$" How did you get this? I tried really hard, but I cant get the residues in form of a sum involving harmonic numbers.
Also, I have always been interested.
$|f(z)|\sim\frac{\log(|z|)^2}{|z|^3}$
How can you say those are similar?
– Amad27 Dec 28 '14 at 19:16