Upper bound of the sum $\sum_{n=1}^\infty \tan^{-1}\left(\frac{x}{1-(x-n)^2}\right)$ as $x\to \infty$ I am stuck at finding a Big-O upper bound of the following sum as $x\to \infty$ $$\sum_{n=1}^\infty \tan^{-1}\left(\frac{x}{1-(x-n)^2}\right)$$
I tried: Since $$ \sum_{n=1}^\infty\tan^{-1}\left(\frac{x}{1-(x-n)^2}\right)=\sum_{n=1}^\infty O\left(\frac{x}{n^2}\right) $$
Now we have for $x_0>0$ and $M>0$ $$ \sum_{n=1}^\infty\tan^{-1}\left(\frac{x}{1-(x-n)^2}\right)=\left(M \sum_{n=1}^\infty \frac{1}{n^2}\right)x $$
Now since $\sum_{n=1}^\infty\frac{1}{n^2}$ converges so can we write the following ? $x\to \infty$ $$ \sum_{n=1}^\infty\tan^{-1}\left(\frac{x}{1-(x-n)^2}\right)=O(x) $$
Thnak you for your valuable time and comments.

To get the leading asymptotics term, we can switch from summation to integration. As @Jack D'Aurizio mentioned, we are getting $O(1)$ term while evaluating  $S_2$, therefore we can only try to catch the leading term. As was shown above, the leading term is $O(\sqrt x)$.
Indeed, implementing the program, denoting for a while $x=N\to\infty$ and dropping the lower terms
$$-S(N)=-\sum_{n=1}^\infty \arctan\left(\frac{N}{1-(N-n)^2}\right)\sim-\int_0^\infty\arctan\frac{N}{1-(n-N)^2}dn$$
$$\sim\int_0^\infty\arctan\frac{N}{(n-N)^2}dn$$
We do not care about the accurate evaluation near $n=N$: as was mentioned, it gives only the contribution $\sim O(1)$.
Integrating by part,
$$-S(N)\sim\int_0^\infty\frac{2Nn(n-N)}{N^2+(n-N)^4}dn=2N^2\int_{-N}^\infty\frac{tdt}{N^2+t^4}+2N\int_{-N}^\infty\frac{t^2dt}{N^2+t^4}$$
Making some changes and dropping vanishing at $N\to0$ terms,
$$\sim N^2\int_{N^2}^\infty\frac{dx}{N^2+x^2}+2N\int_{-\infty}^\infty\frac{t^2}{N^2+t^4}dt-2N\int_N^\infty\frac{t^2}{N^2+t^4}dt$$
It is easy to see that only second term is divergent at $N\to\infty$, therefore
$$-S(N)\sim 2N\int_{-\infty}^\infty\frac{t^2}{N^2+t^4}dt=2\sqrt N\int_{-\infty}^\infty\frac{t^2}{1+t^4}dt=\sqrt N\int_0^1(1-t)^{-\frac{1}{4}}t^{-\frac{3}{4}}dt$$
$$\boxed{\,\,-S(x)\sim\sqrt x\, B\Big(\frac{1}{4};\frac{3}{4}\Big)=\sqrt 2\,\pi\,\sqrt x\quad\text{at}\,\,x\to\infty\,\,}$$
We can also check that at
$\displaystyle x=100\quad -S(100)=34.22;\,\,\sqrt 2\pi\,\sqrt {100}=44.43$
$\displaystyle x=300\quad -S(300)=76.07;\,\,\sqrt 2\pi\,\sqrt {300}=76.95$
$\displaystyle x=500\quad -S(500)=98.44;\,\,\sqrt 2\pi\,\sqrt {500}=99.34$
$\displaystyle x=1000\,\, -S(1000)=139.6;\,\,\sqrt 2\pi\,\sqrt {1000}=140.5$, etc.
