Lemma 0. Any infinite subset of a totally ordered set contains a strictly increasing sequence or a strictly decreasing sequence.
Proof: Say $(x_n)$ is a sequence of distinct elements of some totally ordered set. Say $n$ is dominant if $x_n>x_k$ for all $k>n$.
If there are infinitely many dominant values of $n$, say $n_1<n_2<\dots$, then $(x_{n_j})$ is strictly decreasing. Otoh if there are only finitely many dominant values of $n$ then there exists $N$ such that every $n>N$ is non-dominant, allowing you to construct a strictly increasing sequence $(x_{n_j})$.
Now say $f$ is as above, and define $$\omega(x)=\max(|f(x)-f(x+)|,|f(x)-f(x-)|).$$
Lemma 1. $f$ is bounded, and for every $\epsilon>0$ the set $\{x:\omega(x)>\epsilon\}$ is finite.
Proof. If $f$ is unbounded then there is a strictly monotone sequence $(x_n)$ such that $|f(x_n)|\to\infty$. If $x_n$ increases to $x$ then $f(x-)$ does not exist; similarly if $x_n$ decreases to $x$.
Similarly if $(x_n)$ is a strictly monotone sequence with $\omega(x_n)>\epsilon$.
Cor. $f$ is continuous at $x$ for all but countably many $x$ (so in particular $f$ is continuous almost everywhere, hence Riemann integrable).
You can find the theorem that a bounded almost-everywhere-continuous function is Riemann integrable on the internet.