This is an outline for the case when we are integrating over $\displaystyle [0,1]$, I leave it to you to generalize. Let $\displaystyle \varepsilon>0$ be given. Then, since for the interval $\displaystyle [\tfrac{\varepsilon}{2},1]$ $\displaystyle f$ is continuous we may find a parition $\displaystyle P$ of it such that $\displaystyle U\left(P,f\mid_{[\frac{\varepsilon}{2},1]}\right)-L\left(P,f\mid_{[\frac{\varepsilon}{2},1]}\right)<\frac{\varepsilon}{2}$. But, clearly $\displaystyle \sup_{x\in[0,\frac{\varepsilon}{2}]}f(x)=1,\inf_{x\in[0,\frac{\varepsilon}{2}]}f(x)=0$ and so $\displaystyle U\left(\left\{0,\frac{\varepsilon}{2}\right\},f\mi d_{[0,\frac{\varepsilon}{2}]}\right)-L\left(\left\{0,\frac{\varepsilon}{2}\right\},f\mi d_{[0,\frac{\varepsilon}{2}]}\right)=\frac{\varepsilon}{2}$. So, what can we do now?