To supplement RobJon's answer, the multiple branches for the arctangent function have integral representation
$$\arctan(x;n)=n\pi+\int_0^x \frac{1}{1+u^2}\,du \tag 1$$
for integer $n$. On the principal branch for the arctangent, $n=0$.
Using $(1)$, we can write the integral of interest as
$$\int_{-1}^1\frac{1}{1+u^2}\,du=\arctan(1;n)-\arctan(-1;n) \tag 2$$
The choice of branch for the arctangent does not impact the value of the integral in $(2)$, provided one uses only one branch for both $\arctan(1;n)$ and $\arctan(-1;n)$.
An as aside, we can evaluate the integral in $(2)$ without appealing to the arctangent function. For $|x|\le 1$, the integral in $(1)$ can be transformed into the series
$$\int_0^x \frac{1}{1+u^2}\,du=\sum_{n=0}^\infty \frac{(-1)^n\,x^{2n+1}}{2n+1}$$
For $x= 1$, Leibniz used a purely geometric proof to show
$$\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}=\frac{\pi}{4} $$
from which it trivially follows that
$$\int_{-1}^{1}\frac{1}{1+u^2}\,du=\frac{\pi}{2}$$
Using Leibniz's result, we can also evaluate the integral $\int_0^\infty \frac{1}{1+u^2}\,du$ by writing
$$\begin{align}
\int_0^\infty \frac{1}{1+u^2}\,du&=\int_0^1\frac{1}{1+u^2}\,du+\int_1^\infty \frac{1}{1+u^2}\,du \tag 3\\\\
&=2\int_0^1 \frac{1}{1+u^2}\,du \tag 4\\\\
&=\frac{\pi}{2}
\end{align}$$
where in going from $(3)$ to $(4)$ we enforced the substitution $u\to 1/u$ in the second integral. Therefore, we find that
$$\lim_{x\to \infty}\arctan(x;n)=n\pi+\pi/2$$
as expected!