Delta Function Identity and Path Integral containing Delta Function Context
I'm currently working through a paper where we utilize the identity $$1=\int\mathcal{D}\sigma\delta(\sigma-\phi^2)=\int\mathcal{D}\sigma\mathcal{D}\zeta e^{i\int\zeta(\sigma-\phi^2)}$$
This is then inserted into a path integral of the general form $\int\mathcal{D}\phi f(\phi^4)$ to give $\int\mathcal{D}\phi\mathcal{D}\sigma\delta(\sigma-\phi^2)f(\phi^4)$. The delta function is then turned around leading to $$\int\mathcal{D}\phi\mathcal{D}\sigma\delta(\sigma-\phi^2)f(\phi^4)=\int\mathcal{D}\phi\mathcal{D}\sigma\delta(\phi^2-\sigma)f(\sigma^2)$$
At this point, the second equality of the identity is utilized to give $$\int\mathcal{D}\phi\mathcal{D}\sigma\mathcal{D}\zeta\exp\left\{i\int\zeta(\phi^2-\sigma)\right\}f(\sigma^2)$$
The $\sigma$ integral is then analytically evaluated.
Questions
Firstly, I don't understand where the second equality of the identity comes about. I've tried looking it up and looking in various textbooks but to no avail.
Secondly, in that same identity referenced in my first question, what exactly is being integrated in $i\int\zeta(\phi^2-\sigma)$? To my knowledge, $\zeta$, $\phi$ and $\sigma$ are just variables.
Finally, how does one evaluate the integral referenced in my second question ($i\int\zeta(\phi^2-\sigma)$)?
 A: Most of this is taken from analogy with the finite-dimensional integral case. First recall that Fourier theory gives us the representation of the Dirac delta as $$\delta(x-y)=\int\dfrac{d^Nk}{(2\pi)^N} e^{ik\cdot (x-y)}=\int \dfrac{d^Nk}{(2\pi)^N}\exp\left[i\sum_{i=1}^N k^i (x^i-y^i)\right]\tag{1}.$$
Now let $\phi(x)$ be some field. We should think of the uncountably many variables $\phi(x)$ as the analogue of $N$ variables $z^i$. In the same way as the integer $i=1,\dots, N$ labels the variable $z^i$ the spacetime points $x\in \mathbb{R}^{4}$ label the variables $\phi(x)$.
In that case if $\phi(x)$ and $\xi(x)$ are two field configurations we can use (1) to make sense, even if only formally, of $\delta[\phi-\xi]$. Employing analogy we are going to integrate over a new $\zeta(x)$, which takes the role of $k$ in the finite-dimensional case, and the sum over $i=1,\dots, N$ becomes one integral over spacetime. In other words
$$\delta[\phi-\xi]=\int {\cal D}\zeta \exp\left[i\int d^4x \zeta(x)\big(\phi(x)-\xi(x)\big)\right]\tag{2}.$$
One basic remark is that in the finite dimensional case we have the $(2\pi)^N$, which has no analogue in (2), so we  just drop it. In any case any factor like that would only change the normalization of the measure.
This should answer your question about what is being integrated in the exponent.
Knowing the representation of the Dirac delta everything proceeds as in usual manipulations with delta distributions. In anything multiplying $\delta[\sigma-\phi^2]$ the equality $\sigma=\phi^2$ is enforced and therefore $$\delta[\sigma-\phi^2]f[\phi^4]=\delta[\sigma-\phi^2]f[\sigma^2].\tag{3}$$
So the idea is that you had one integral of $f[\phi^4]$, you introduce a Dirac delta $\delta[\sigma-\phi^2]$, this distribution turns $f[\phi^4]$ into $f[\sigma^2]$ and then you use (2) ro represent the Dirac delta:
\begin{eqnarray}\int {\cal D}\phi f[\phi^4]&=&\int{\cal D}\phi{\cal D}\sigma \delta[\sigma-\phi^2]f[\phi^4]=\int{\cal D}\phi{\cal D}\sigma\delta[\sigma-\phi^4]f[\sigma^2]\\&=&\int{\cal D}\phi{\cal D}\sigma{\cal D}\zeta \exp\left[i\int d^4x \zeta(x)\big(\sigma(x)-\phi^2(x)\big)\right]f[\sigma^2]\tag{4}\end{eqnarray}
After that the integral over $\sigma$ can be evaluated probably because $f$ gives you a gaussian integral.
A: $\sigma$, $\zeta$ and $\phi$ are fields so the integral $\int \zeta(\sigma - \phi^2)$ is just the integral of this local function of the fields over space-time.
The second equality in the first line is just the Fourier transform of the Dirac $\delta$ function, the equivalent of the $1D$ :
$$\int \text d \xi e^{ix\xi} = 2\pi \delta(x)$$
(the $2\pi$ factor is irrelevant, since the normalization of the functional measure $\mathcal D\zeta$ is ill-defined anyway).
In the $n$ dimensional case, what would appear in the exponential factor of the Fourier transform is the scalar product (be it euclidean or lorentzian) :
$$\int \text d^n\xi e^{ix\cdot \xi} = (2\pi)^n\delta^{(n)}(x)$$
In the functional case (for real fields), the scalar product is just the integral :
$$(\xi,\zeta) = \int \text d x \xi(x) \zeta(x) = \int \xi \zeta$$
So we get :
$$\int \mathcal D\zeta e^{i\int \zeta \phi} = \delta(\phi)$$
