I think the way is doing the decomposition as follows, but I just don't know how to deal with the quadratic term:
$f(z)=\frac{1}{(z+i)z^2}=-\frac{1}{z+i}+\frac{1}{z}-\frac{i}{z^2}$
where, $-\frac{1}{z+i}=-\frac{1}{2i}\frac{1}{1+\frac{z-i}{2i}}$ and $\frac{1}{z}=\frac{1}{1+\frac{z-i}{i}}$ can be expanded easily.
But how to deal with $-\frac{i}{z^2}$?
Let $u = z+i$. Then $z = u - i$, so \begin{align*} \frac{1}{z^2} = \frac{1}{(i - u)^2} = \frac{1}{-(1 - u/i)^2} = -\frac{1}{(1 + iu)^2} \end{align*} Since $0 < |u| < 1$, then $0 < |iu|< 1$ as well, so this can be expanded as the derivative of a geometric series: \begin{align*} \frac{1}{1 - x} = \sum_{n \geq 0} x^n \implies \frac{1}{(1 - x)^2} = \frac{d}{dx} \frac{1}{1-x} = \frac{d}{dx} \sum_{n \geq 0} x^n = \sum_{n \geq 1} n x^{n-1} \, . \end{align*}