Here I tried to compute such integral by Complex Integration. $\int \frac{z^2}{1+z^4} $ It follows that the solution to $1+z^4$ on such domain is $e^{1/4\pi i}, e^{3/4\pi i}$ .
I tried to find a decomposition, it follows that $P(x) = (z-e^{1/4\pi i})(z- e^{3/4\pi i})Q(x)$, and I let $ Q(x) = z^2 + iBz + 1$, but then the equation yields a strange B = $\sqrt(2)$ which does not satisfy the equation(why?) and I can proceed no further.
The original post is the entire function, then I edited it into an integral on a semi-circle so that it would be simpler. But now I switch back to the OP to be consistent with the accepted answer. Sorry if causing any confusion!
If I'm not mistaken you want to calculate $$\oint_\mathcal{C}\frac{z^2}{1+z^4}\,\mathrm{d}z,$$ where every singularity of the integrand $f(z)$ is contained in $\mathcal{C}$. First of all - what are the poles of $f(z)$? Solving $z^4+1=0$ gives us $z_1=e^{(i\pi)/4}, z_2=-e^{(i\pi)/3}, z_3=e^{(3i\pi)/4}, z_4 = -e^{(i\pi)/4}$. Now the the only thing left is to calculate the residues. Note that all poles are of fourth order. If $f$ has a pole of fourth order at $z_j$ we have $$ \operatorname{Res}_{z_j} f = \cfrac{1}{6}\lim\limits_{z\rightarrow z_j}\cfrac{\partial^{3}}{\partial z^{3}}[(z-z_j)^4f(z)].$$
If we want to calculate $f(z)$ along a semi-circle in the upper half plane we will parametrize $z=Re^{i\varphi},\varphi\in(0,\pi)$. We get $$\int\limits_{0}^{\pi}\frac{R^2e^{2i\varphi}}{1+R^4e^{4i\varphi}}iRe^{i\varphi}\,\mathrm{d}z.$$ For $R\to\infty$, this integral vanishes. This is because $$\left\lvert\int\limits_{0}^{\pi}\frac{R^2e^{2i\varphi}}{1+R^4e^{4i\varphi}}iRe^{i\varphi}\,\mathrm{d}z\right\rvert \leq \int\limits_{0}^{\pi}\frac{R^3}{R^4-1}\,\mathrm{d}z\to0.$$