Show that $f\colon\bar{M}\to\mathbb{R}$ is Riemann-integrable 

Consider a Jordan-measurable set $M\subset\mathbb{R}^n$ and $f\colon\bar{M}\to\mathbb{R}$ continious. Show that $f$ is Riemann-integrable over $M$.


I think the main facts for the prove are:


*

*$M$ is bounded and so $\bar{M}$ is compact

*$f$ therefore is bounded and uniformly continious
I need a stepfunction that is $\leqslant f$ and one that is $\geqslant f$.
In a book I found this idea of a proof:
Set $B:=\sup_{x\in M}\lvert f(x)\rvert$.
Consider any $\varepsilon >0$. Then there are finite many disjoint open intervalls $(Q_j)$ so that
$$
\mathrm{vol}(M)-\sum_j 
\mathrm{vol}(Q_j)\leqslant\varepsilon/(2B).
$$
Because $f$ is uniformly continious one can divide each $Q_j$ small enough in intervals $Q_j'$ so that the oscillation on each $Q_j$ is $\leqslant \varepsilon/(2 
\mathrm{vol}(M)$.
Equally there are disjoint compact intervalls $(K_l)$ so that
$
\mathrm{vol}(M)\geqslant \sum_l 
\mathrm{vol}(K_l)-\varepsilon/(2B)$ and that the oscillation on each $K_l$ is $\leqslant \varepsilon/(2 vol(M))$.
From this we get for each $x\in M$
$$
\sum_j (\inf_{y\in Q_j}f(y))\cdot\chi_{Q_j}(x)\leqslant f(x)\leqslant\sum_l (\sup_{y\in K_l}f(y))\cdot\chi_{K_l}(x)
$$
and from this
$$
\sum_j (\inf_{y\in Q_j}f(y))\cdot vol(Q_j)\leqslant\int_* f\leqslant\int^* f\leqslant\sum_l (\sup_{y\in K_l}f(y))vol(K_l)
$$
Last but not least the book says that it is (by choice of the $Q_j$ and the $K_l$)
$$
\lvert\sum_l (\sup_{y\in K_l}f(y))vol(K_l)-\sum_j (\inf_{y\in Q_j}f(y))vol(Q_j)\rvert\leqslant\varepsilon.
$$

There is one main thing I did not understand yet:
Why is
$$
\left\lvert\sum_l (\sup_{y\in K_l}f(y))vol(K_l)-\sum_j (\inf_{y\in Q_j}f(y))vol(Q_j)\right\rvert\leqslant\varepsilon?
$$
Please help me.
With greetings
 A: Revised answer:
So it seems that the proof from your book is incorrect or incomplete.  So please allow me to write a different proof from scratch, which is hopefully simpler:
Let a simple function be a finite sum of the form $$g(x) = \sum_i a_i \mathbb{1}_{A_i}(x)$$ with $a_i \in \mathbb{R}$, the $A_i$'s a disjoint union of Jordan measurable sets, and $\mathbb{1}_{A_i}$ the indicator function on $A_i$.  Then we define the Riemann integral of $g$ to be
$$\int g = \sum_i a_i |A_i|$$
where $|\cdot|$ is the Jordan measure of the set.
Let the lower sum $\int_{*,M} f$ on $M$ be defined to be
$$\int_{*,M} f = \sup \int g$$
where the supremum is taken over all simple functions $g:M \rightarrow \mathbb{R}$ with $g \leq f$ on $M$.  We similarly define the upper sum $\int_M^* f$.  If $\int_{*,M} f = \int_M^* f$, we define their common value to be the Riemann integral $\int_M f$ of $f$ over $M$.
Now let $Q_i \subset \mathbb{R}^n$ be a disjoint collection of half-open $n$-rectangles that cover $M$, such that the oscillation of $f$ on each $Q_i \cap M$ is less than $\epsilon / M$.
Let $A_i = Q_i \cap M$.  Note that since intersections of Jordan measurable sets are Jordan measurable, the $A_i$ are Jordan measurable.  Then
$$g(x) = \sum_i (\inf_{A_i} f) \mathbb{1}_{A_i}(x)$$
is a simple function on $M$ with $g \leq f$.  Similarly let
$$h(x) = \sum_i (\sup_{A_i} f) \mathbb{1}_{A_i}(x)$$
be the simple function on $M$ with $f \leq h$.
Then we have
$$\int_M g \leq \int_{*,M} f \leq \int_M^* f \leq \int_M h.$$
Moreover,
$$\int_M h - \int_M g = \sum_i (\sup_{A_i} f - \inf_{A_i} f) |A_i| \leq \sum_i \frac{\epsilon}{M} |A_i| = \epsilon.$$
Since $\epsilon$ can be made arbitrarily small, we have $\int_{*,M} f = \int_M^* f$, showing the $f$ is Riemann integrable on $M$.
