In general, for a measure $\mu$, one can find the notations
$$
\langle \mu,f\rangle = ∫ f\,\mu = ∫ f(x)\,\mu(\mathrm d x) = \int f\,\mathrm d\mu = \int f(x)\,\mathrm d\mu(x),
$$
to denote the integral of a function $f$ with respect to the measure $\mu$. Remark that the $x$ variable is a dummy variable, one can choose whatever name, such as
$$
∫ f\,\mu = \int f(y)\,\mu(\mathrm d y) = \int f(x)\,\mu(\mathrm d x).
$$
In your formula, you first fix a $x\in X$ that has nothing to do with the integral. Then you define the measure $μ = \delta_x$. Then you look at the integral with respect to this measure (written in your case with the 3rd convention of my first equation)
$$
\int_X f \,\mathrm d\delta_x = ∫_X f(y)\,\delta_x(\mathrm d y) = f(x).
$$
A (real-valued) measure can be defined in two equivalent ways thanks to Riesz representation theorem:
- A functional assigning to each measurable set a value: for every set $A\subset X$, $μ(A)\in\mathbb R$.
- A functional assigning to each continuous function a value: for every function $f$, $\mu(f) = ∫_X f\,\mu$.
A way to understand how to go from one to the other point of view is to remark that if you have a sequence of continuous functions $f_n$ converging to the characteristic function of a set $A⊂X$, then
$$
\int_X f_n(x)\,\mu(\mathrm d x) \to \int_X \mathbf 1_{A}(x) \, \mu(\mathrm d x) = \int_A \mu(\mathrm d x) = \mu(A),
$$
while, in the other direction, if you are given a measure $\mu$ as a functional on every set $A⊂ X$, you can build the integral with respect to this measure in a similar way a one build the classical integral with respect to the Lebesgue measure. So, one assigns the value
$$
\int_X \mathbf 1_{A}(x) \, \mu(\mathrm d x) := \mu(A),
$$
and then one can approximate measurable functions by sum of characteristic functions of sets.
In the case of the Dirac delta, one has the equivalence between your definition $\delta_a(A) = 1$ if $a∈A$ and $0$ if not, and the integral definition
$$
∫ f \,\delta_a = f(a).
$$
Remark: I do not recommend the notations $\int f\,\mathrm d \mu = \int f(x)\,\mathrm d \mu(x)$ which are incoherent with the Stieltjes integral notation, in which one writes $μ = \mathrm d g$ for a function $g$ that is the derivative of the measure of $\mu$, so
$$
∫ f(x)\,\mu(\mathrm d x) = ∫ f(x)\,\mathrm dg(x).
$$