for each $\epsilon >0$ there is a $\delta >0$ such that whenever $m(A)<\delta$, $\int_A f(x)dx <\epsilon$

Any integrable $f:[0,1] \to R$ can be approximated by a continuous function $f_\epsilon$ on $[0,1]$ up to $\epsilon$ in $L^1$. With this, the fix to your argument is to use the triangle inequality:

$$\left| \int_A f dx \right| \leq \left| \int_A (f-f_\epsilon) dx \right| + \left| \int_A f_\epsilon dx \right| \leq \epsilon + \delta M.$$

Epsilon is picked first, from this we get an $M$ dependent on $f_\epsilon$ (dependent on $\epsilon$) and from this we can pick $\delta = \epsilon/M$. to get the upper bound $2 \epsilon$.

If you don't feel comfortable with a continuous approximation (ala Lusin's theorem) you can use simple functions instead.


You don't have to limit to $[0,1]$. Here is the proof.

Let $B_n=\{x:x\in E,\:n-1<f(x)\leqslant n\}$ and $C=\{x:x\in E,\:f(x)>n\}$. We have $$ \int_Efdm=\int_{\bigcup_{n=1}^{\infty}B_n}fdm=\sum_{n=1}^{\infty}\int_{B_n}fdm $$ Since $\sum_{n=1}^{\infty}\int_{B_n}fdm$ is absolute convergent, given $\epsilon>0$ there is a $N$ such that for any $n>N$ $$ \sum_{n=N+1}^{\infty}\int_{B_n}fdm=\int_{\bigcup_{n=N+1}^{\infty}B_n}fdm<\epsilon/2\tag{1} $$ Let $$ B=\bigcup_{n=1}^{N}B_n\quad\text{and}\quad C=\bigcup_{n=N+1}^{\infty}B_n=E-B $$ Take $\delta=\dfrac{\epsilon}{2(N+1)}$. Then for any $A\subset E$ such that $m(A)<\delta$, by $(1)$ $$ \int_Afdm=\int_{A\cap (B\cup C)}fdm=\int_{A\cap B}fdm+\int_{A\cap C}fdm\leqslant N\int_Adm+\int_Cfdm<N\dfrac{\epsilon}{2(N+1)}+\dfrac{\epsilon}{2}<\epsilon $$


Denote $E_n = \{x: f(x) \geq n\}$. Since $f$ is integrable then $f$ is finite a.e. So we have $f(x)\chi_{E_n}(x) \to 0$ for a. e $x$. Moreover $0 \leq f \chi_{E_n} \leq f$, by the dominated convergence theorem, we have $$\lim_{n\to\infty}\int_{E_n} f dm =0.$$ For any $\epsilon >0$, we choose $N> 0$ such that $\int_{E_N} f dm < \epsilon/2$. Choosing $\delta = \epsilon/2N$, then for any subset $E$ such that $m(E) < \delta$ we have $$\int_E fdm = \int_{E\cap E_N} f dm +\int_{E\setminus E_N} fdm \leq \int_{E_N} fdm +N m(E\setminus E_N) < \frac{\epsilon}2 +\frac{\epsilon}2 =\epsilon.$$