It follows from what you've done so far that
$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$
The integral on the left is twice the one you're after. The integral on the right can be evaluated using the 'obvious' substitution of $u = \cos x$ and then hopefully you recognize the integral.
Added (in response to comment below)
You have shown that
$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{(\pi - x) \sin x}{1+\cos^2 x} dx $$
In other words,
$$\int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi \sin x}{1+\cos^2 x} dx - \int_0^\pi \frac{x\sin x}{1+\cos^2 x} dx $$
and hence
$$2 \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \int_0^\pi \frac{\pi\sin x}{1+\cos^2 x} dx$$
So we can write the original integral as being equal to this integral:
$$ \int_0^\pi \frac{x \sin x}{1+\cos^2 x} dx = \frac{\pi}{2} \int_0^\pi \frac{\sin x}{1+\cos^2 x} dx$$
Clear now?