Example 4 Given that $a$ is an integer, the equation concerning $x$
$$
\frac{x^{2}}{x^{2}+1}-\frac{4|x|}{\sqrt{x^{2}+1}}+2-a=0
$$

has real roots. Then the possible values of $a$ are $\qquad$
(2008, I Love Mathematics Junior High School Summer Camp Mathematics Competition)
【Analysis】Take any real root $x_{0}$ of the equation. Then
$$
\frac{x_{0}^{2}}{x_{0}^{2}+1}-\frac{4\left|x_{0}\right|}{\sqrt{x_{0}^{2}+1}}+2=a \text {. }
$$

Notice that $\frac{x_{0}^{2}}{x_{0}^{2}+1}=\left(\frac{\left|x_{0}\right|}{\sqrt{x_{0}^{2}+1}}\right)^{2}$.
Let $\frac{\left|x_{0}\right|}{\sqrt{x_{0}^{2}+1}}=t$.
By $\sqrt{x_{0}^{2}+1}>\sqrt{x_{0}^{2}}=\left|x_{0}\right|$
$\Rightarrow \frac{\left|x_{0}\right|}{\sqrt{x_{0}^{2}+1}}<1 \Rightarrow 0 \leqslant t<1$
$\Rightarrow a=t^{2}-4 t+2=(t-2)^{2}-2$.
Also $0 \leqslant t<1 \Rightarrow-1<(t-2)^{2}-2 \leqslant 2$
$\Rightarrow-1<a \leqslant 2 \Rightarrow a$'s possible values are $0, 1, 2$.