I do not quite see how $$\sum_{k=0}^mf\left(\frac{k}{m}\right) \approx\int_0^mf\left(\frac{x}{m}\right)dx\tag{1}$$ immediately.
Though I know the for the following Riemann sum.
$$m\sum_{k=0}^mf\left(\frac{k}{m}\right)\frac{1}{m}\to m\int_0^1 f(x)dx$$ and by making the substitution $x=\frac{y}{m}$ and changing the variable name, I get $$\int_0^mf\left(\frac{x}{m}\right)dx$$
Edit:
(1) is an approximation given in my book. I would like a word explanation why it is correct without going through the steps I gave
With one small change, this is just the right Riemann sum for a partition with all partition-widths $= 1$.
That is, the interval of integration is $[0,m]$ and the function being integrated is $g(x) := f\left(\frac xm\right)$, and we choose partition points $x_k = k, k = 0, ..., m$. On each partition $[k-1, k]$, we choose the right end point to be where we evaluate the function.
So we estimate the integral $$\int_0^m f\left(\frac xm\right)\,dx = \int_0^m g(x)\, dx \approx \sum_{k=1}^m g(k)[k - (k-1)] = \sum_{k=1}^m f\left(\frac km\right)$$
The difference from your formula is that the sum is from $k=1$, not $k = 0$. If $f(0) = 0$, the two sums agree, and note that the actual function they applied this to is indeed $0$ at $x = 0$.