I quote a theorem due to Lusin:
Let $X$ be a locally compact Hausdorff space and let $\mu$ be a regular Borel measure on $X$ such that $\mu(K)<\infty$ for every compact $K\subseteq X$. Suppose $f$ is a complex measurable function on $X$, $\mu(A)<\infty$, $f(x)=0$ if $x\in X\setminus A$, and $\epsilon>0$. Then there exists a continuous complex function $g$ on $X$ with compact support such that
$\mu(\{x:f(x)\neq g(x)\})<\epsilon$.
Furthermore, the function $g$ can be chosen such that
$sup_{x\in X}|g(x)|\leq sup_{x\in X}|f(x)|.
As an immediate corollary (which is more relevant to your question), observe that:
If the hypotheses of Lusin's theorem are satisfied and if $|f|\leq 1$, then there is a sequence $\{g_n\}$ of continuous complex functions with compact support such that $|g_n|\leq 1$ for all $n$ and
$f(x)=\lim_{n \to \infty}g_n(x)$
almost everywhere with respect to $\mu$.
Note that the proof of Lusin's Theorem requires Urysohn's lemma. For more details on these results and their proofs, see Chapter 2 of the second edition of Walter Rudin's Real and Complex Analysis. (The results can be more precisely located on pages 56 and 57.)