Proving continuity of $f$
Functions satisfying the inequality $$ f\Bigl(\frac{x_1+x_2}2\Bigr)\le\frac{f(x_1)+f(x_2)}2 $$ are called midpoint convex. This is a slightly weaker condition than convexity. Continuous midpoint convex functions are convex. A beautiful result due to Sierpinski is that Lebesgue measurable midpoint convex functions are convex.
To prove that a bounded midpoint convex is continuous, argue by contradiction. Supose $f$ is discontinuous at $x_0\in(a,b)$. Without loss of generality we may assume $x_0=0$, $f(x_0)=0$.
First step. There exists a sequence $\{x_n\}\subset(a,b)$, such that $\lim_{n\to\infty}x_n=0$ and $\lim_{n\to\infty}f(x_n)=m\ne0$. We may assume that $m>0$.
Second step. The sequence $\{2\,x_n\}$ also converges to $0$ and $$ \begin{align} f(x_n)=f\Bigl(\frac{0+2\,x_n}2\Bigr)\le\frac{f(0)+f(2\,x_n)}2 &\implies f(2\,x_n)\ge2\,f(x_n)\\&\implies\liminf f(2\,x_n)\ge2\,m. \end{align} $$ Iteration shows that $$ \liminf f(2^k\,x_n)\ge2^k\,m, $$ which is impossible since $f$ is bounded.
You can find this and much more in this book.