How can the integral of the Dirac delta be defined if its domain is the space of test functions? It is often stated that
$$\int_{-\infty}^\infty\delta(x) \, {\rm d}x = 1$$
However, the Dirac delta can be defined formally as a distribution
$$\delta: D(\mathbb{R}) \to \mathbb{R}, \qquad \delta(f) = f(0)$$
and in that case, how can we make sense of the integral of the Dirac delta if its domain isn't the set of real numbers?
 A: The notation $\int_{-\infty}^{\infty}\delta_0(x)f(x)\,dx$ means $\delta_0(f)$. The integral is just a suggestive notation since when a distribution is an actual function, it's action is integration. But distributions act on $C_c^{\infty}$, and $1 \notin C_c^{\infty}$, so you have to make sense of $\delta_0(1)$ somehow.
Since $\text{supp}(\delta_0) = \{0\}$ is compact, $\delta_0 \in \mathcal{E}'(\mathbb{R}^n)$, the space of compactly supported distributions. This space can be identified with $C^{\infty}(\mathbb{R}^n)'$, the dual space of $C^{\infty}(\mathbb{R}^n)$, in the following way: If $u \in \mathcal{E}'(\mathbb{R}^n)$ is supported on $K$, then pick $\phi \in C_c^{\infty}(\mathbb{R}^n)$ such that $\phi = 1$ on a neighborhood of $K$ and extend $u$ to act on $\psi \in C^{\infty}(\mathbb{R}^n)$ by $u(\psi) = u(\phi\psi)$. So $\int_{-\infty}^{\infty}\delta_0(x)\,dx = \delta_0(1) = 1$ now makes sense.
A: As mentioned by @Mason, integration for general distributions is not defined and it's just a convenient notation, since the action of distributions that are Lebesgue-integrable on test functions is equivalent to integration against these functions. I think that $\int \delta(x) \ dx = 1$ is used in some literature because there are sequences of functions that satisfy this property, i.e., that integrate to $1$, and converge to the dirac delta in the sense of distributions.
To be more precise, take a function $g$ that satisfies: $\int g(x) dx = 1$ and define $g_{\varepsilon} = \frac{1}{\varepsilon} g(\frac{x}{\varepsilon})$. Then, one can show that: $\int g_\varepsilon(x) dx = 1$. Moreover, $\lim_{\varepsilon \to 0} g_\epsilon = \delta(x)$ in the sense of distributions, i.e., $\lim_{\varepsilon \to 0} \int g_\epsilon (x) \phi(x) \ dx = \phi(0) = \langle \delta, \phi \rangle \ \forall \phi \in \mathcal{D}(\mathbb{R})$. That's why, it's "convenient" to say that also the limit, i.e., the Dirac delta, also satisfies this property, although integration there loses its meaning.
