Let $f$ be a non-negative function defined for $[a,b]$ such that for every $\mathcal E >0$, the set $\{ x \in [a,b] : f(x) \geq \mathcal E\}$ is finite. Prove that $f$ is Riemann integrable in $[a,b]$, and that $\int ^b_a f(x)dx = 0$.
Intuitively, I can see that this function must either be the zero function, or a mapping of finite points which descend into the zero function, from the second part of the question. I know that the complement of the given set is $\{x \in [a,b] : f(x) < \mathcal{E}\}$, which is infinite, and I managed to prove it is integrable only for the case where the given set is empty, but other than that — I'm stuck.
Let $\epsilon >0$. Then redefine $f$ at the points where $f(x) >\epsilon$ by making it $0$ at these points. Changing the value at a finite number of points does to change Riemann integrability or the value of the integral. Hence we get $\int_0^{1} f(x)dx \leq\epsilon$ and since $\epsilon$ is arbitrary we get $\int_0^{1} f(x)dx=0$.