Proof (approximation by simple functions)

Define the measurable sets $$ \begin{align*} A_i^{(n)} ={}& f\inv\Bigl(\Bigl[\frac{i}{2^n}, \frac{i+1}{2^n}\Bigr)\Bigr), \qquad i=0,1, \ldots, n\cdot 2^n-1, \\ A_\infty^{(n)} ={}& f\inv([n, \infty]) \end{align*} $$ and the simple function $$ \begin{align*} f_n = \sum_{i=0}^{n \cdot 2^{n}-1} \frac{i}{2^n} \mathbb{1}_{A^{(n)}_i} + n \, \mathbb{1}_{A_{\infty}^{(n)}}. \end{align*} $$

By construction $f_n \leq f$. Also since the partitions $\bigsqcup_{i=0}^{n \cdot 2^{n}-1} A_i^{(n)} \sqcup A^{(n)}_\infty$ of $E$ get finer as $n$ increases, $f_n$ is increasing.

Fix $x\in E$ and we want to show $f_n(x)\to f(x)$.

If $f(x) = \infty$, then $x\in A_\infty^{(n)}$ for all $n$, so $f_n(x) = n \to \infty = f(x)$ as required.

Otherwise if $f(x) < \infty$, then for $n>f(x)$, there is some $0\leq i\leq n\cdot 2^n-1$ such that $$ \begin{align*} f_n(x) = \frac{i}{2^n} \leq f(x) \leq \frac{i+1}{2^n} = f_n(x) + \frac{1}{2^n}. \end{align*} $$ Therefore $f_n(x) \to f(x)$.