How can I numerically implement $\delta(f(x,y))$ I would like to numerically implement a Dirac Delta function whose argument is another 2 variable function. I know that I can model a Dirac Delta numerically using a Gaussian. What can I do if I want to implement $\delta(f(x,y))$. Will using a function like $e^{-f(x,y)^2/\sigma^2}$ work?
Edit: $\sigma$ is a parameter I can control to make the peak of the Gaussian sharper. By 'implement', I mean generate numerically, that is to generate a 2 variable Delta function over a 2D grid.
The Dirac delta function $\delta$ is a linear functional which maps your functions into your scalars. To be precise, suppose $V$ is a vector space over $\mathbb{R}$ consisting of continuous functions $f : \mathbb{R}^n \rightarrow \mathbb{R}$ and $x_0 \in \mathbb{R}^n$, then the functional $T : V \rightarrow \mathbb{R}$ given by $$T(f) = f(x_0)$$ is the Dirac delta function with respect to the point $x_0$. The term functional rather than function is used to emphasize that the codomain of $T$ is your set of scalars. It is clear that $T$ is linear, because $$T(af + bg) = a f(x_0) + b g(x_0) = a T(f) + b T(g)$$ for all $a,b \in \mathbb{R}$ and $f, g \in V$.

Many, many functionals $S : V \rightarrow \mathbb{R}$ can be written exactly as
$$ S(f) = \int_{\mathbb{R}^n} f(x) s(x)dx$$
for a suitable choice of $s$. Dirac's delta function is an exception. It can be approximated using such functionals or you can simply implement it using the definition.
Yes, exactly: if the delta function $\delta$ can be well-approximated by a gaussian function $N$, then $\delta(f(x,y)) \approx N(f(x,y)) = \frac{1}{Z_0}\exp{(-f(x,y)^2/\sigma^2)}$, with $Z_0$ a normalizing factor.

The only difficulty I can see is that depending on the possible values of $f$, it may be important for your application to have a sharper gaussian function $N$.