Here's how I proceeded:
Set $f(z) := \frac{z^2}{(z^2+1)^2}$, $g(t):=\frac{t^2}{(t^2+1)^2}$.
$(z^2+1)^2=[(z+i)(z-i)]^2$, so $f(z)$ has poles of order $2$, and the singular points are $i$ and $-i$. Now one needs to find the residue at $i$ in order to evaluate this integral over the contour of radius $R$, located in the upper half of the complex plane, as well as on the real line from $R$ to $-R$.
The question is: how to find the residue at $i$?
$Res_{z=i}[f(z)]=\lim\limits_{z\to i} \frac{d}{dz}(z-i)^2 \frac{z^2}{[(z-i)(z+i)]^2}=2\lim\limits_{z\to i}(z-i) \frac{z^2}{[(z-i)(z+i)]^2}=2\lim\limits_{z\to i} \frac{z^2}{(z-i)(z+i)^2} $
But here's where I get stuck. Would appreciate some clarification.
You made a mistake at the derivative. Note that $$\left(\frac{z^2}{(z+i)^2}\right)' = \frac{2z(z+i)^2-2z^2(z+i)}{(z+i)^4}=\frac{2zi}{(z+i)^3}.$$ Hence the residue you want is $\frac{1}{4i}$.