This is another simpler but longer approach.
Notice that it is enough to show that $|f|=0$ everywhere, so let's assume that $f$ is nonnegative.
Since $f=0$ a.e. it follows that
$$\int_{\Bbb R^n} f=0.$$
Divide the entire space $\Bbb R^n$ in nonoverlapping cubes of side length 1, say $\{I_k\}_{k\in\Bbb N}$, then
$$0=\int_{\Bbb R^n} f=\sum_{k\in\Bbb N} \int_{I_k} f$$
and then
$$\int_{I_k} f=0$$
for each $k\in\Bbb N$. That's the key of this proof.
Lemma. Let $f:\Bbb R^n\to\Bbb R$ be a continuous nonnegative function. Let $I=[a^1,b^1]\times\cdots\times [a^n,b^n]$ be an interval. If
$$\int_I f=0,$$
then
$$f(x)=0$$
for each $x\in I$.
Proof. The proof is by induction on $n$.
If $n=1$ it is just this.
Suppose that the result holds for $1,\ldots,n-1$. Notice that Fubini's theorem is applicable, so
$$\newcommand{\d}{\mathrm{d}}
\newcommand{\x}{\mathbf{x}}
\int_I f(\x)\d\x=\int_{a^n}^{b^n}\left[\int_{a^{n-1}}^{b^{n-1}}\cdots \int_{a^{1}}^{b^{1}} f\left(x^1,\ldots,x^n\right)\d x^{1}\cdots \d x^{n-1}\right]\d x^{n}.\tag{1}\label{eqi}$$
Define $K:\left[a^n,b^n\right]\to\Bbb R$ by
$$K(t)=\left[\int_{a^{n-1}}^{b^{n-1}}\cdots \int_{a^{1}}^{b^{1}} f\left(x^1,\ldots,t\right)\d x^{1}\cdots \d x^{n-1}\right].$$
The LHS of \ref{eqi} is $0$, so $K$ is $0$ a.e. in $\left[a^n,b^n\right]$. Since $K$ is continuous in $\left[a^n,b^n\right]$, by our hypothesis follows that $K$ is $0$ identically in $\left[a^n,b^n\right]$.
Now, fix $t\in \left[a^n,b^n\right]$. By Fubini again
$$\int_{[a^1,b^1]\times\cdots\times [a^{n-1},b^{n-1}]} f\left(x^1,\ldots,x^{n-1},t\right)\d \left(x^1,\ldots,x^{n-1}\right)=K(t)=0,$$
by our induction hypothesis, it follows that
$$f\left(x^1,\ldots,x^{n-1},t\right)=0$$
for each $\left(x^1,\ldots,x^{n-1}\right)\in [a^1,b^1]\times\cdots\times [a^{n-1},b^{n-1}]$. Since $t\in \left[a^n,b^n\right]$ is arbitrary it follows that
$$f\left(x^1,\ldots,x^{n}\right)=0$$
for each $\left(x^1,\ldots,x^{n}\right)\in I$, as we wanted.
Then using the Lemma, it follows that $f$ is $0$ everywhere in each $I_k$ and therefore $f$ is identically $0$.