Let $X$ be a topological space, $f:X\rightarrow \mathbb{R}$ a continuous function, $x_0\in X$ and $\delta(-,x_0)$ the Dirac-delta distribution. Then (abusing notation) we have $$\int_{x\in X}\delta(x,x_0)f(x)=f(x_0).$$
Next, consider a continuous function $f:X^n\rightarrow \mathbb{R}$ and $x_0\in \mathbb{R}$. Is there a similar formula involving the integral $$\int_{x\in X^n}\delta (f(x),x_0)f(x)?$$
I am mainly interested in the case that $X=\mathbb{R}$ and $f$ is the $n$-fold multiplication map, meaning $f(x_1,\ldots,x_n)=x_1\cdot \ldots \cdot x_n.$
I know that this is a vague and probably non-well posed question. I'm looking for something like "something similar appears/is considered here" or "maybe this could be relevant."
Background: The co-Yoneda lemma in category theory can be seen as a kind of categorification of the first identity (see Remark 2.3 here). I'm interested in a version of the second integral in the category world.