Consider a real-valued function $f$ on $[a,b]$ with the property that for every $\epsilon>0$, the set $\{x \in[a,b] : |f(x)| \geq \varepsilon\}$ is finite. So, in other words, $f$ is zero almost everywhere on its domain. It seems intuitively true that $$ \int_{a}^{b} f \, dx =0, $$ but I'm having a hard time proving even that $f \in \mathscr{R}([a,b])$.
So far I got: Let $\varepsilon>0$. I want to show that there is a partition $P$ such that $U(P,f)-L(P,f)<\varepsilon$. Choose the partition $P=\{ x_{i} : i =0,1,\dots,n \}$ containing the points where $|f(x_{i})|\geq \varepsilon$. Then $$ L(P,f) = \sum_{ i=1 }^{ n } m_{i} \Delta x_{i} < \varepsilon (b-a). $$
I don't know how to proceed here. Any help would be greatly appreciated!