Let $f\in L^1(\mathbb{R},\mathcal{R},\lambda)$. If $\displaystyle\int_a^b f(x)dx=0$ whenever $a,b\in\mathbb{R}$ with $a<b$, then $f=0$ a.e.
Since $f\in L^1(\mathbb{R},\mathcal{R},\lambda)$ we may write $f$ as the sum of simple functions, where each simple function is $\sum_{n=1}^\infty a_n 1_{E_n}$, where $E_n= \left\{ x \, | \, f(x) > 1/n \right\}$, so that $E:=\bigcup_{n\in\mathbb{N}} E_n = \left\{ x \, | \, f(x) > 0 \right\}$, and where $a_n$ are scalars. Then, if $\lambda(E)>0$, then there is some $n$ such that $\lambda(E_n)>0$ and hence $$\int f \geq \int f 1_{E_n} \geq \frac{1}{n}\lambda(E_n)>0,$$ a contradiction. I am not convinced that this is correct though.
That might work if $f$ is nonnegative, but if not there isn't a contradiction there. Here is an argument you might flesh out:
If $G$ is an open set then $\displaystyle \int_G f = 0$.
If $H$ is a countable intersection of open sets (a $G_\delta$ set), then $\displaystyle \int_H f = 0$. [The dominated convergence theorem will help.]