Let $A\subset\mathbb{R}^n$ and suppose $f:A\to\mathbb{R}$ is integrable. Show that for any $\varepsilon>0$ there are continuous functions $\phi,\psi:A\to\mathbb{R}$ such that $\phi(x)<f(x)<\psi(x)$ for all $x\in A$ and $\int_A\psi-\phi<\varepsilon$
This is somewhat similar to This question, but there they only deal with the one-dimensional case (and there isn't even an answer).
I think I understand the theoretical idea, that as the set of points of discontinuities of $f$ is negligible we can find boxes $\{Q_i\}_{i\in\mathbb{N}}$ containing it, and each of these boxes must have at least one edge whose length converge to 0.
We then use the same construction we use in the one-dimensional case, of $\psi$ and $\phi$ which are identical to $f$ outside a box somewhat larger than $Q_i$, equal to $\sup f$ and $\inf f$ on $Q_i$ respectively and then taking the maximum/minimum of connecting the edge points of $Q_i$ with the continuous part of $f$ linearly and the actual behaviour of $f$.
But I'm having a really rough time formalizing it. I'm not sure how to show that we can find sets $Q_i$ which are disjoint (so that this construction could work), and I'm not sure how to explicitly write the "connecting of the edge point of $Q_i$ with the continuous part of $f$".
Any insights?
edit: I've still been trying to formalize it. I solved one of the problems, that is if I have a collection of open balls $\{Q_i\}$ such that $$\sum_i\rm{vol}(Q_i)<\delta$$ I can take a collection of open balls $\{Q_i'\}$ where each $Q_i'$ is a ball centered at the center of $Q_i$ with double the radius, and then $$\sum_i\rm{vol}(Q_i')<c\cdot\delta$$ for some $c\in\mathbb{R}$, and then if for some $i,j$, $$Q_i'\cap Q_j'\neq\emptyset$$ I replace $Q_i$ and $Q_j$ with $Q_i\cup Q_j$ (and similarly for $Q_i', Q_j'$).
Now I want to define $\phi,\psi$ very similarly somewhat like this:
$$\psi(x)=\begin{cases} f(x) & \forall i, x\notin Q_i'\\ \sup(\{f(a)| a\in Q_i\}) & \exists i,x\in Q_i\\ \max\{f(x),\text{Some continuous connection}\} & \rm{Otherwise} \end{cases}$$
and
$$\phi(x)=\begin{cases} f(x) & \forall i, x\notin Q_i'\\ \inf(\{f(a)| a\in Q_i\}) & \exists i, x\in Q_i\\ \min\{f(x),\text{Some continuous connection}\} & \rm{Otherwise} \end{cases}$$
where I have that, supposing $\sup f=M$ and $\inf f = m$
$$\int_A\left(\psi-\phi\right)=0+\sum_i\int_{Q_i'}\left(\psi-\phi\right)\leq\sum_i\int_{Q_i'}\left(\sup_{Q_i'}f-\inf_{Q_i'}f\right)\leq c\delta(M-m)$$
This works as $\delta$ is as small as I wish, but I still don't know how to deal with the "Some continuous connection" part in the definition of $\phi$ and $\psi$. Also I was told the continuous can be interchanged with smooth and even infinitely differentiable, where again I'd love insight on how this is done..

