I am looking for the proof of the following theorem. I can not prove it myself and also can't find any solutions on the internet. The theorem goes as follows:
Let $f:[a,b]\rightarrow\mathbb{R}$. If $f(x+)$ and $f(x-)$ (left and right hand limits of x) exist for every $x\in(a,b)$ as well as $f(a+)$ and $f(b-)$ then f is bounded and Riemann integrable (Riemann integral exists and is a real number).
Note that I am looking for the solution without use of complex analysis.
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-)|).$$
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$.
You can find the theorem that a bounded almost-everywhere-continuous function is Riemann integrable on the internet.