Delta function and integrating over level sets? Consider the three-dimensional integral
$$
  \int_{\mathbb R^3} d^3x\,f(x)\delta(g(x))
$$
where $\delta$ is the dirac delta, $f,b:\mathbb R^3\to\mathbb R$ and $g(x) = 0$ on some surface $S$.  Is there a way of rewriting the above integral as a surface integral over the level set $S$?  Related to this, is there some distributional identity like
$$
  \delta(g(x)) = \int_S ds dt \frac{\delta^{(3)}(x - X(s,t))}{|g'(X(s,t))|}
$$
where $X(s,t)$ is a parameterization of $S$ that would allow one to to this, analogous to the formula
$$
  \delta(h(x)) = \sum_{x_0\in h^{-1}(0)}\frac{\delta^{(3)}(x-x_0)}{|h'(x_0)|}
$$
when the zero set of $h$ is finite?
 A: This is an interesting question as it delves into a more general distributional version of the change of variables formulas for integration of functions. This exact question is answered by Theorem 6.1.3 of Hormander's Analysis of Linear Partial Differential Operators, Vol. 1.
For convenience, I'll reprint it here:
Theorem 6.1.5 (Hormander Vol. 1): If $g$ is a real valued function in $C^{\infty}(X)$, $X \subset \mathbb{R}^{n}$, and if $|g'| = |\nabla g| = \left( \sum_{j=1}^{n}|\partial_{x_{j}}g|^{2}\right)^{1/2} \neq 0$ when $g = 0$, then $g^{*}\delta_{0} = dS/|g'|$, where $dS$ is the Euclidean surface measure on the surface $\{x \in \mathbb{R}^{n} \, | \, g(x) = 0\}$.
Applied to your problem, note that the equation
\begin{equation*}
\int_{\mathbb{R}^{3}}d^{3}x f(x) \delta_{0}(g(x))
\end{equation*}
can be rewritten in distributional notation as
\begin{equation*}
g^{*}\delta_{0}(f),
\end{equation*}
where for smooth functions $u:\mathbb{R} \to \mathbb{R}^{m}$, the pullback $g^{*}u$ is defined as $u \circ g$. In order to properly understand the pullback of a distribution (e.g. $g^{*} \delta_{0}$), one should consult a text on distribution theory. However, it is always possible to approximate a distribution by a sequence of smooth functions, so often times it is enough to show what one needs in the context of smooth functions and then apply dominated convergence to obtain the distributional result.
Anyway, for test functions $f \in C_{0}^{\infty}(\mathbb{R}^{n})$, we have from Theorem 6.1.3 that
\begin{align*}
g^{*}\delta_{0}(f) & = \langle g^{*}\delta_{0}, f\rangle\\
& = \langle dS/|g'|, f \rangle\\
& = \int_{g^{-1}(0)} \frac{f(x)}{|\nabla g(x)|}\,dS_{x}.
\end{align*}
A: I refer you to section 4.5 in the WP page (and references therein): simple layer integral. It turns out you can write $$\int_{\mathbb{R}^3} f(\vec{r})\delta(g(\vec{r}))d\vec{r}=\int_{S}\frac{f(\vec{r})}{|\vec{\nabla}g(\vec{r})|}d\sigma$$
A very similar question to this one is here.
