Suppose we have a discrete measure $$ \mu = \sum_{i=1}^n a_i \delta(x-x_i)$$ where \begin{equation} \delta(x-x_i) = \begin{cases} 1 & \text{if } x = x_i \\ 0 & \text{otherwise} \end{cases} \end{equation} Obviously, for any function $f$, we could integrate $f$ w.r.t. $\mu$ $$ \int f d\mu = \sum_{i=1}^n a_i f(x_i). $$
The question is that can we write $$ d\mu = \sum_{i=1}^n a_i \delta(x-x_i)dx ??? $$ In the first glance, I thought it is true. But it seems that the meaning of $\delta$ changes in this case. In the weak sense, $\delta$ is defined as $$ \delta(x-x_i) = \begin{cases} \infty & \text{if } x = x_i \\ 0 & \text{otherwise} \end{cases} $$ with $$ \int f(x)\delta(x-x_i)dx = f(x_i). $$ Am I on the right track?
If we're talking about mathematical correctness then no, you absolutely cannot write $ d\mu = \sum_{i=1}^n a_i \delta(x-x_i)dx$. Because $\delta$ is not a function. People do write that, but it's at best hideously sloppy.
Note that btw the definition of $\delta(x-x_i)$ is not what you say it is. If we're doing measure theory then there's no problem with a non-negative function taking the value $\infty$.But if we define a function $\Delta(x-x_i)$ by$$ \delta(x-x_i) = \begin{cases} \infty & \text{if } x = x_i \\ 0 & \text{otherwise} \end{cases} $$
then we have $$\int f(x)\Delta(x-x_i)\,dx=0$$ for every $f$, since $f(x)\Delta(x-x_i)=0$ almost everywhere. That's not the same as $\int f(x)\,d\delta(x-x_i)$, which equals $f(x_i)$.
"In the weak sense" the definition of $\delta(x-x_i)$ is in fact $$\int f(x)\,d\delta(x-x_i)=f(x_i)\quad(f\in C(\Bbb R).$$