Let $\mathcal{D}(\mathbb{R})$ be the space of test-functions in $\mathbb{R}$ and let $f$ be a $C^\infty$ function. I want to show that if $f$ has $n$ zeroes $x_1,\dots,x_n$ in the interval where it is well defined, then we have
$$\delta\circ f = \sum_{i=1}^{n}\dfrac{1}{|f'(x_i)|}\delta_{x_i},$$
where $(\delta_{x_i},g)=g(x_i)$, i.e. $\delta_{x_i}$ is the $\delta$ centered at $x_i$. In a more "traditional" notation, this would be
$$\delta(f(x))=\sum_{i=1}^{n}\dfrac{\delta(x-x_i)}{|f'(x_i)|}.$$
Now the definition of composition of distribution is: if $T\in \mathcal{D}'(\mathbb{R})$ is a distribution and $\xi$ is a $C^\infty$ function then $T\circ \xi$ is the distribution defined by $(T\circ \xi, \phi) = (T, |J^{-1}|\phi\circ \xi^{-1})$, for all $\phi\in \mathcal{D}(\mathbb{R})$, where $J^{-1}$ is the Jacobian of the inverse transformation. Clearly since we are dealing with just one dimension, we have $J^{-1} = 1/f'\circ f^{-1}$. In the special case of $T = \delta$ we have:
$$(\delta\circ f,\phi)=\left(\delta, \dfrac{1}{|f'\circ f^{-1}|}\phi \circ f^{-1}\right)=\dfrac{1}{|f'(f^{-1}(0))|}\phi(f^{-1}(0)).$$
This is almost what we need but there are some issues which I'm not being able to solve:
To do all of that, $f$ must be invertible. In other words, $f$ must be a bijection. In particular, $f$ cannot have more than one zero, otherwise it is not injective and $f^{-1}(0)$ is clearly ambiguous.
The definition of $\delta \circ f$ doesn't seem to be able to handle non injective functions. It doesn't seem to follow from the definition the fact that we simply have to take the expression I found, use for each zero and sum all of it up.
In that way, based on the definition of the delta distribution and on the definition of composition of distributions with functions, how can we show the desired fact despite of $f$ not beinj injective in this case?
EDIT: To make things clear, here I'm defining $\delta\in \mathcal{D}'(\mathbb{R})$ as the functional defined by $(\delta,\phi)=\phi(0)$ for all $\phi\in \mathcal{D}(\mathbb{R})$. Of course there are sequences $(\phi_n)_{n\in \mathbb{N}}\in \mathcal{D}(\mathbb{R})$ which converge pointwise to $\delta$ (the delta sequences), but this is not part of the definition.
More than that, the definition of composition I'm using is as I've stated. We could, of course, work formally. Pretend as in traditional approaches that $(\delta,\phi)$ is really
$$(\delta,\phi)= \int_{-\infty}^{\infty}\delta(x)\phi(x)dx,$$
break the real line on intervals where $f$ is injective and manipulate the integral. But again, this would be working formally, since there is no $\delta(x)$. The usage of delta sequences could help here to make the same calculation rigorous, but I'm trying to do without it. The reason is simple: if the fact is true, then we should be able to prove it just with the definition of composition and of the delta.
In that case, how can we just using the definitions prove this fact? Or to prove this, the definition of composition should be somehow extended?