[step:Choose the mesh so crossing intervals have small total length]Define
\begin{align*}
\eta := \min\{q_j-q_{j-1}:1 \leq j \leq m\}.
\end{align*}
Since $Q$ is a finite partition and each interval length is positive, $\eta>0$. Choose
\begin{align*}
\delta := \min\left\{\eta,\frac{\varepsilon}{8M(m-1)}\right\}
\end{align*}
if $m \geq 2$, and choose $\delta := \eta$ if $m=1$.
Let $(P,t)$ be a tagged partition of $[a,b]$ with
\begin{align*}P=\{x_0,x_1,\dots,x_n\}, \qquad a=x_0<x_1<\cdots<x_n=b,\end{align*}
and tags $t_i \in [x_{i-1},x_i]$ for $i \in \{1,\dots,n\}$. Write
\begin{align*}
\Delta x_i := x_i-x_{i-1}.
\end{align*}
Let $B$ be the set of indices $i \in \{1,\dots,n\}$ such that the interval $[x_{i-1},x_i]$ contains at least one point of $\{q_1,\dots,q_{m-1}\}$ in its interior. Let $G:=\{1,\dots,n\}\setminus B$.
Because $|P|<\eta$, each interval $[x_{i-1},x_i]$ contains at most one interior point of $Q$. Hence the map sending $i \in B$ to the unique point of $\{q_1,\dots,q_{m-1}\}$ contained in $(x_{i-1},x_i)$ is injective, so $|B| \leq m-1$. Therefore, if $m \geq 2$,
\begin{align*}
\sum_{i \in B}\Delta x_i \leq (m-1)|P| < (m-1)\delta \leq \frac{\varepsilon}{8M}.
\end{align*}[/step]