Show that every upper semi-continuous real function is measurable [duplicate]
I'm going to show that the set $U = \{x \,:\,f(x) \lt t\}$ is open for each $t \in \mathbb{R}$ (so $f$ is indeed measurable):
We have $x \in U$ if and only if $f(x) \lt t$. Fix $x \in U$. Take $\varepsilon = t-f(x)$. Your definition of upper semi-continuity yields a $\delta$ such that $|x-y| \lt \delta$ implies $f(y) \lt f(x) + \varepsilon = t$, so $|x-y| \lt \delta$ implies $y \in U$.
See also this related question.