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)