Integrating by parts again,
$$
\begin{align}
\int_a^bx^2f'(x)\,\mathrm{d}x&=b^2f(b)-a^2f(a)-2\int_a^bxf(x)\,\mathrm{d}x\\
\int_a^b\left(x^2f'(x)+2xf(x)\right)\,\mathrm{d}x&=b^2f(b)-a^2f(a)
\end{align}
$$
For $a,b$ large enough so that $\left|\,xf'(x)+2f(x)-1\,\right|\le\epsilon$, this means that
$$
\left|\,\left(b^2f(b)-\frac12b^2\right)-\left(a^2f(a)-\frac12a^2\right)\,\right|\le\epsilon\,\left|\,\frac12b^2-\frac12a^2\,\right|
$$
Therefore, we get that
$$
f(x)\to\frac12\tag{2}
$$
Combining $(1)$ and $(2)$ yields