The problem is to calculate
$$\int_0^\infty \frac{\sin(x)}{x(1+x^2)^2}dx$$
According to Wolfram Alpha, the answer is $\frac{(2e-3)\pi}{4e}=\frac{\pi}{2}-\frac{3\pi}{4e}$, which strongly suggests an answer based on the residue theorem. The residue of the function at $i$ is $\frac{3e^{-1}-e}8 i$; multiplying by $2\pi i$, that is $-\frac{3\pi}{4e}+\frac{e\pi}4$.
So this indicates a method of finding some contour around the point $i$ and showing that its integral approaches $\frac{e\pi}{4}-\frac{\pi}2$ as it expands (some radius $R\to \infty$). However, I do not seem to be able to find an easy contour to integrate on.
I've tried the obvious ones (images):
But stuff gets really weird thanks to the $\sin(x)$ and there seems to be no easy way to simplify the integrals. Any ideas?

The integrand is even, so writing it as $$ \int_0^\infty \frac{\sin(x)}{x(1+x^2)^2} \, {\rm d}x = \frac{1}{2} \int_{-\infty}^\infty \frac{\Im\left(e^{ix}\right)}{x(1+x^2)^2} \, {\rm d}x \, .$$ The imaginary part can be pulled infront of the integral when $x$ is not complex valued (which would not be the case for a complex contour), but only real. On the other hand, using complex analysis requires the contour to not be discontinuous, but it must avoid $x=0$. Therefore the integral is written as $$\Im \left(\int_{-\infty}^\infty \frac{e^{ix}}{2x(1+x^2)^2} \, {\rm d}x + \int_{|x|=\epsilon} \frac{e^{ix}}{2x(1+x^2)^2} \, {\rm d}x \right)$$ where the first integral is now a complex contour integral encircling the singularity at $0$ clockwise at radius $\epsilon$, while the second integral is counter-clockwise to compensate for this complex valued $\epsilon$-contour. The total contour is missing that $\epsilon$-circle and is known as the principal value. Eventually $\epsilon$ goes to $0$. The first integral contour can now be closed in an arc in the upper half-plane and it is trivial to see in this case that this arc - $\lim_{R\rightarrow \infty} x=R e^{it}$ with $0<t<\pi$ - vanishes. As a result, the residue theorem can be applied and hence $$=\Im \left(\frac{1}{2} \, \left\{ 2\pi i \, {\rm Res}_{x=i} + i\pi {\rm Res}_{x=0} \right\} \frac{e^{ix}}{x(1+x^2)^2} \right) \\ = \Im \left( i\pi \frac{{\rm d}}{{\rm d}x} \frac{e^{ix}}{x(x+i)^2} \Bigg|_{x=i} + \frac{i\pi}{2} \right) = \Im \left( \frac{-3\pi i}{4e} + \frac{i\pi}{2} \right) = -\frac{3\pi }{4e} + \frac{\pi}{2} \, .$$