I will try to give an approach to this integral using complex analysis:
First of all we would like to have a form of the integral which is most easily tractable by contour integration, which (at least for me) means that
One way of doing so, is exploiting the parity of the integrand and transform $y\rightarrow 1/x$. We get: $$ I=\frac{1}{2}P\int_{-1}^{1}\frac{1}{x}\frac{\sqrt{x^2-1}}{1+x^2}dx $$
Here $P$ denotes Cauchy's principal value. We now may consider the complex function
$$ f(z)=\frac{1}{z}\frac{\sqrt{z^2-1}}{1+z^2} $$
Choosing the standard branch of logarithm, we have a cut on the interval $[-1,1]$, furthermore we have singularities at $\{\pm i,0\}$ where the first two are harmless but the one at zero is on the cut and will need to be handeled with care.
Now may choose a contour which encloses the branch cut, and avoids the singularity at 0. we get:
$$ \oint f(z)dz = \underbrace{\int_{-1}^{-\epsilon}f(x_+)+\int_{\epsilon}^{1}f(x_+)}_{2I}+\int_{\text{arg}(z)\in(\pi,0], |z|=\epsilon}f(z)dz\\-\underbrace{\int_{-1}^{-\epsilon}f(x_-)-\int_{\epsilon}^{1}f(x_-)}_{-2I}-\int_{\text{arg}(z)\in[0,-\pi), |z|=\epsilon}f(z)dz=\\ 4I+\underbrace{2\int_{\text{arg}(z)\in(\pi,0], |z|=\epsilon}f(z)dz}_{2 \times \pi i\ \times \text{res}[f(z),z=0] }=\\ 4I +2\pi \quad (1) $$
Where $\text{res}[f(z),z=0]=i$ because we calculated the residue above the branch cut. Furthermore $f(x_{\pm})$ denotes about which side of the cut we are talking: $\pm$ above/below. Also the limit $\epsilon \rightarrow 0$ is implicit.
Now comes the trick: By looking at the exterior of the contour we can also write (please note that we now enclose the singularities in opposite direction compared to above)
$$ \oint f(z)dz=-2\pi i \times(\text{res}[f(z),z=i]+ \text{res}[f(z),z=-i])=2\sqrt{2}\pi \quad (2) $$
Equating $(1)=(2)$
$$ 4I+2\pi=2\sqrt{2}\pi\\ $$ or $$ I=\frac{\pi}{2}\left(\sqrt{2}-1\right) $$
which is the same result as the one obtained by trig. substitution.