As suggested, we show that the statement is true when $f$ is either continuous or monotone. Indeed it is sufficient to assume $f$ satisfies
$$\tag{1} (d-c)\sup_{x\in [c,d]} f(x) > \int_c^d f(x) dx.$$
for all subintervals $[c,d]\subset [a,b], c<d$. Clearly (1) is satisfied when $f$ is continuous or monotone.
Next we argue by contradiction (we write "btsin" as "by taking a subsequence if necessary").
Assume the contrary that $\lambda(P_n)$ does not converge to zero. btsin, assume $\lambda(P_n) \ge \epsilon_0$ for some $\epsilon_0$. Thus there is a subinterval $[a_n,b_n]$ in the partition $P_n$ with $b_n - a_n \ge \epsilon_0$. btsin, assume $a_n \to a_\infty \in [a,b]$. Then btsin, there are $[c,d]$ with
$$a_n \le c < d\le b_n$$
Now consider the refinement $\bar{P_n}$ of $P_n$ by adding $c,d$. Then $\lambda (\bar P_n) \ge d-c$ and
$$U(f,P_n) \ge U(f,\bar P_n) \ge \int_a^b f(x)dx \Rightarrow U(f, \bar P_n) \to \int_a^b f(x)dx. $$
However, by (1), we have
$$\begin{split}
U(f,\bar P_n) &= U(f, P_n \cap [a,c]) + (d-c)\sup_{x\in [c,d]}f(x) + U(f, P_n\cap [d,b]) \\
&> \int_a^c f(x) dx + \int_c^d f(x) dx + \delta + \int_c^d f(x)dx \\
&= \int_a^b f(x)dx + \delta.
\end{split}$$
Here $\delta$ is a positive number that can be added to the RHS of (1) and still preserve the inequality. It does not depend on $n$.
Thus we arrive at a contradiction and the statement is proved.