Prove that any continuous function on a closed interval in $\mathbb{R}$ is integrable.
Let $f:[a,b]\rightarrow \mathbb{R}$ be a continuous function. We want to show that for any $\epsilon>0$ there is $\delta>0$ such that whenever $S_1$ and $S_2$ are Riemann sums corresponding to partitions of $[a,b]$ of width less than $\delta$, it is true that $$|S_1-S_2|<\epsilon \mbox{.}$$
Let $P_1=(x_0,x_1,\ldots,x_n)$ and $P_2=(y_0,y_1,\ldots,y_m)$ be partitions of $[a,b]$ and let $$\hat x_1\in [x_0,x_1], \ldots, \hat x_n\in [x_{n-1},x_n]$$
$$\hat y_1\in [y_0,y_1], \ldots, \hat y_n\in [y_{m-1},y_m] \mbox{.}$$
Then $S_1=\sum_{i=1}^n f(\hat x_i)(x_i-x_{i-1})$ and $S_2=\sum_{i=1}^m f(\hat y_i)(y_i-y_{i-1})$.
Let $(z_0,\ldots,z_p)$ be the coarsest common refinement of partitions $P_1$ and $P_2$. Let $$\tilde x_1\in [z_0,z_1], \ldots, \tilde x_p\in [z_{p-1},z_p]$$
$$\tilde y_1\in [z_0,z_1], \ldots, \tilde y_p\in [z_{p-1},z_p]$$ be chosen is such a way that $$S_1=\sum_{i=1}^p f(\tilde x_i)(z_i-z_{i-1})$$ and $$S_2=\sum_{i=1}^p f(\tilde y_i)(z_i-z_{i-1})$$ (it's easy, just "replicate" some of $\hat x_i$s and $\hat y_i$s if necessary).
Since $f$ is uniformly continuous, there is $\delta>0$ such that $|f(x)-f(y)|<\frac{\epsilon}{p(b-a)}$ whenever $x,y\in[a,b]$ and $|x-y|<\delta$. Thus
$$|S_1-S_2|=\sum_{i=1}^p |f(\tilde x_i)-f(\tilde y_i)|\cdot(z_i-z_{i-1})< p \frac{\epsilon}{p(b-a)}(b-a) =\epsilon$$
I'm asking here for the verification of this proof.
Your proof is fine but it can be streamlined:
Let $\epsilon >0$ and choose a partition $\mathcal P=\left \{ a,x_1,\cdots ,x_{n-2},b \right \}$ such that $\vert f(x)-f(y)\vert < \epsilon $ whenever $x,y\in [x_i,x_{i+1}]$.This is possible since $f$ is uniformly continuous on $[a,b]$.
Let $m_i=\min \left \{ f(x):x\in [x_i,x_{i+1}] \right \};\ M_i=\max \left \{ f(x):x\in [x_i,x_{i+1}] \right \}.$
Then
$\vert U(f)-L(f)\vert =\vert \sum_{i=0}^{n}(M_i-m_i)(x_{i+1}-x_i)\vert \leq \epsilon \sum_{i=0}^{n}(x_{i+1}-x_i)\leq \epsilon (b-a)$