I am studying measure theory, and especially Lebesgue differentiation theorem. Let $f : \mathbb{R}^n \to \mathbb{R}$ be a Lipschitz function, and let $N=f^{-1}(0)$. Show that for almost every point $x\in N$ the derivative $Df(x) : \mathbb{R}^n\to \mathbb{R}$ of $f$ at $x$ exists and $Df(x)=0$.
Following a hint for this question, I have reduced down to showing that for a.e. $x\in N$, we have $$\text{dist}(y, N)=\inf\{|y-z|: z\in N\} =o(|y-x|)$$ as $y\to x$. As $f$ is a continuous function, $N$ is closed, and since $\{y\}$ is a compact set, it follows that $\text{dist}(y,N)$ is positive for $y \not\in N$, and we also have that for any $y \in X$, the infimum $\text{dist}(y,N)$ is actually achieved by some $z \in N$. How can I proceed from here? I was thinking also of using functions of bounded variation since any Lipschitz function from $\mathbb R$ to itself is of bounded variation and any $F: \mathbb R \to \mathbb R$ of bounded variation can be written as a difference of two increasing functions and an increasing function has derivatives a.e., but since we are working in general $\mathbb R^n$ I wasn't sure if this would work.