The function I want to study reads $$ f(y)= \frac{\sqrt{1+y^2}}{\pi^2 y} \int_0^\infty du \left\lbrace \arctan \left[\frac{2y}{u^2(1+y^2)+1-y^2 }\right] \right\rbrace^2 \, , $$ and it is well-defined for any real $y$ (actually the integral diverges for $y=0$, but this divergence is tamed by the prefactor so that $f(0)=0$, and $f(y)\simeq y/\pi$ for small $y$).
By computing the integral numerically I learn that $$ \lim_{y\to \infty}f(y) = 1 \, , $$ so I am interested in its asymptotic behavior for large $y$, like $$f(y)\simeq 1-g(y) \, ,$$ for some function $g(y)$ (vanishing in the limit $y\to\infty$) which I want to determine. Clearly a blind Taylor expansion does not work, because not all the terms in the series converge.
Do you have any suggestion?
EDIT:
The branch of the $ArcTan$ is chosen so that it returns a number in $[0,\pi]$.
EDIT 2:
To further clarify which branch of the $ArcTan$ I am interested in, here I am plotting the integrand $ArcTan$ (without squaring it) for two sample values of $y$. For $y=1$, in particular, the argument of $ArcTan$ is always positive, so it returns $\pi/2$ at $u=0$ and then it decays to zero at large $u$.
With this choice, $f(y)$ grows monotonically from $0$ to $1$, with no peak (and no other surprises) in the middle.

In this problem we define $$\arctan x=\operatorname{Arctan}x, \,\text{at}\,x>0$$ $$\arctan x=\pi-\operatorname{Arctan}|x|, \,\text{at}\,x<0$$ where $\operatorname{Arctan}x$ denotes the main branch $(\operatorname{Arctan}x=0\,\text{at}\,x=0\,\,\text{and}\,\operatorname{Arctan}x=\frac{\pi}{2}\,\text{at}\,x\to\infty\,)$.
Then $$f(y)= \frac{\sqrt{1+y^2}}{\pi^2 y} \int_0^\infty \left\lbrace \arctan \left[\frac{2y}{u^2(1+y^2)+1-y^2 }\right] \right\rbrace^2du$$ $$=\frac{\sqrt{1+y^2}}{\pi^2 y}\int_1^\infty \left\lbrace \arctan \left[\frac{2y}{(1+y^2)\big(u^2-\frac{y^2-1}{y^2+1}\big) }\right] \right\rbrace^2du$$ $$+\frac{\sqrt{1+y^2}}{\pi^2 y}\int_0^1 \left\lbrace \pi-\arctan \left[\frac{2y}{(1+y^2)\big(\frac{y^2-1}{y^2+1}-u^2\big) }\right] \right\rbrace^2du$$ Dropping the terms which bring additional factor $\sim\frac{1}{y^2}$, we can simplify the integral. The form of the first asymptotics terms will confirm the chosen approach.
For example, $$ \frac{\sqrt{1+y^2}}{\pi^2 y}=\frac{1}{\pi^2}\sqrt{1+\frac{1}{y^2}}=\frac{1}{\pi^2}\Big(1+\frac{1}{2y^2}+...\Big)$$ $$\frac{y^2-1}{y^2+1}-u^2=1-u^2-\frac{2}{y^2}-...\,\text{and}\,\,\frac{2y}{1+y^2}=\frac{2}{y}\Big(1-\frac{1}{y^2}+..\Big)$$ So, for the main asymptotics we use the following representation: $$\pi^2f(y)\sim\int_1^\infty \left\lbrace \arctan \left[\frac{2}{y(u^2-1) }\right] \right\rbrace^2du+\int_0^1 \left\lbrace\pi- \arctan \left[\frac{2}{y(1-u^2) }\right] \right\rbrace^2du$$ Making the substitution $x=u^2$ and opening parentheses $$=\pi^2+\frac{1}{2}\int_1^\infty\arctan^2\Big(\frac{2}{y(x-1)}\Big)\frac{dx}{\sqrt x}-\pi\int_0^1\arctan\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}$$ $$+\frac{1}{2}\int_0^1\arctan^2\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=\pi^2+I_1+I_2+I_3\tag{1}$$ Now we will evaluate every term. $$I_1=\frac{1}{2}\int_1^\infty\arctan^2\Big(\frac{2}{y(x-1)}\Big)\frac{dx}{\sqrt x}=\frac{1}{y}\int_0^\infty\arctan^2\frac{1}{t}\,\frac{dt}{\sqrt{1+\frac{2t}{y}}}$$ $$=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt-\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\bigg(1-\frac{1}{\sqrt{1+\frac{2t}{y}}}\bigg)dt\tag 2$$ Integrating by part a couple of times, it is not difficult to evaluate the first integral in $(2)$ $$I_{1,1}=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt=\frac{1}{y}\int_0^\infty\frac{\arctan^2x}{x^2}dx=\frac{\pi\ln2}{y}\tag 3$$ The second integral in $(2)$: $$I_{1,2}=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\bigg(1-\frac{1}{\sqrt{1+\frac{2t}{y}}}\bigg)dt$$ $$=\frac{2}{y^2}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}$$ To estimate it, let's split the interval of integration $[0;\sqrt\frac{y}{2}\,];\,[\sqrt\frac{y}{2};\infty)$. Making the substitution $t=\frac{1}{x}$ $$\frac{2}{y^2}\int_0^\sqrt\frac{y}{2}\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}<\frac{2}{y^2}\int_0^\sqrt\frac{y}{2}\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{2}$$ $$=\frac{1}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{\arctan^2x}{x^3}dx=O\Big(\frac{\ln y}{y^2}\Big)$$ At the same time, $$\frac{2}{y^2}\int_\sqrt\frac{y}{2}^\infty\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}<\frac{2}{y^2}\int_\sqrt\frac{y}{2}^\infty\frac{dt}{t\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}$$ Making the substitution $t=\frac{xy}{2}$ $$=\frac{2}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{dx}{x\sqrt{1+x}(1+\sqrt{1+x})}<\frac{2}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{dx}{x(1+x)}=O\Big(\frac{\ln y}{y^2}\Big)$$ Therefore, $$\boxed{\,\,I_1=\frac{\pi\ln2}{y}+O\Big(\frac{\ln y}{y^2}\Big)\,\,}\tag 4$$ In the same way we evaluate $I_3$. Using $(3)$, after some manipulations we finally get $$I_3=\frac{1}{2}\int_0^1\arctan^2\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=\frac{1}{y}\int_0^\frac{y}{2}\frac{\arctan^2\big(\frac{1}{t}\big)}{\sqrt{1-\frac{2t}{y}}}dt$$ $$=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt+O\Big(\frac{\ln y}{y^2}\Big)+O\Big(\frac{1}{y^{3/2}}\Big)$$ $$\boxed{\,\,I_3=\frac{\pi\ln2}{y}+O\Big(\frac{1}{y^{3/2}}\Big)\,\,}\tag 5$$ The most interesting story is with $I_2$ $$I_2=-\pi\int_0^1\arctan\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=-\frac{2\pi}{y}\int_0^\frac{y}{2}\frac{\arctan\big(\frac{1}{t}\big)}{\sqrt{1-\frac{2t}{y}}}dt$$ Integrating by part $$=-\frac{2\pi}{y}\bigg(\frac{\pi y}{2}-y\int_0^\frac{y}{2}\frac{\sqrt{1-\frac{2t}{y}}}{1+t^2}dt\bigg)$$ After some manipulations, using $\frac{\pi}{2}=\int_0^\infty\frac{dt}{1+t^2}$, and integrating by part one more time $$I_2\sim-\frac{2\pi}{y}\bigg(2+\ln\Big(1+\frac{y^2}{4}\Big)-\frac{1}{y}\int_0^\frac{y}{2}\frac{\ln(1+t^2)}{\sqrt{1-\frac{2t}{y}}\big(1+\sqrt{1-\frac{2t}{y}}\big)}dt\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+\ln\Big(1+\frac{y^2}{4}\Big)-\frac{1}{2}\int_0^1\frac{\ln\Big(1+\frac{y^2}{4}x^2\Big)}{\sqrt{1-x}\big(1+\sqrt{1-x}\big)}dx\bigg)$$ To evaluate the remaining integral, again we split the interval of integration $[0;\sqrt\frac{2}{y}\,];\,[\sqrt\frac{2}{y};1]$. Integration over the first interval gives $O\Big(\frac{\ln y}{y^{3/2}}\Big)$; integration over the second interval gives the main terms. Skipping intermediate steps, we get: $$I_2\sim-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}-\int_0^1\frac{\ln x+\ln\frac{y}{2}}{\sqrt{1-x}\big(1+\sqrt{1-x}\big)^2}dx\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}-2\int_0^1\frac{\ln (1-t^2)}{\big(1+t\big)^2}dx-2\ln\frac{y}{2}\int_0^1\frac{dt}{\big(1+t\big)^2}\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}+2\ln2-1-\ln\frac{y}{2}\bigg)$$ $$\boxed{\,\,I_2=-\frac{2\pi}{y}\big(1+\ln2+\ln y\big)+O\Big(\frac{\ln y}{y^{3/2}}\Big)\,\,}\tag 6$$ Now, putting $(4)$, $(5)$ and $(6)$ into $(1)$ $$\boxed{\boxed{\,\,f(y)=1-\frac{2}{\pi}\frac{(\ln y+1)}{y}+O\Big(\frac{\ln y}{y^{3/2}}\Big)\,\,}}$$