I know that the four singularities for $\int _0^\infty \frac{t^2+1}{t^4+1} dt$ are $\pm \frac{\sqrt{2}}{2} \pm i \frac{\sqrt{2}}{2}$. Also, since the function is even, I can calculate $\frac{1}{2} \int _{-\infty}^\infty \frac{t^2+1}{t^4+1} dt$ instead.
If I use semicircle as a contour, I can put this into
$\int _{-\infty}^\infty \frac{t^2+1}{t^4+1} dt = \int _C \frac{z^2+1}{z^4+1} dz + \lim _{a\rightarrow \infty}\int _{-a}^{a} \frac{z^2+1}{z^4+1} dz$
I can handle the first term by using partial fractions with singularities specified above, but I am quite confused with how to show that the second term goes to zero. Would you mind giving me any help? Just to make sure, this is for personal exercise and not a homework question.
Your notation is a little confusing, but I assume $C$ is the semi-circle of radius $a$. The integral over $C$ tends to $0$ as $a \to \infty$, since
$$ \left| \int_C \frac{z^2+1}{z^4+1}\,dz \right| \le \pi a \max_{C} \left| \frac{z^2+1}{z^4+1} \right| \le \pi a \frac{a^2+1}{a^4-1} $$ which goes to $0$ as $a\to\infty$.