Working with infinitesimals of the form d(f(x)), for example d(ax), and relating them to dx (integration, delta function)

The answer of md2perpe is the good way to prove what you want to prove. Another way to solve your problem, is to remark that defining the Heaviside function $H = \mathbb{1}_{\mathbb{R}_+}$, one has $H' = \delta_0$ and $H(ax) = \mathrm{sign}(a)\,H(x)$. Therefore $$ \begin{align*} \delta_0(a\,x) &= H'(a\,x) = \frac{1}{a} \frac{\mathrm d}{\mathrm d x} (H(a\,x)) \\ &= \frac{1}{a} \frac{\mathrm d}{\mathrm d x} (\mathrm{sign}(a)\,H(x)) = \frac{1}{|a|} H'(x) \\ &= \frac{1}{|a|} \delta_0(x) \end{align*} $$


I will here add some comment about the notation $\mathrm d(f(x))$. One of the problems with this notation is that $\mathrm d x$ denotes the Lebesgue measure, while $\delta$ (which I prefer to write $\delta_0$) is not a Lebesgue measurable function but also a measure. So one should not use the expression $$ ∫ \delta_0(x) \,\mathrm{d} x $$ but either $∫ f(x) \,\mathrm{d} x$ if $f$ is a Lebesgue measurable function, and $∫ f\,\delta_0 = f(0)$ if $f$ is a $\delta_0$ measurable function (e.g. a function continuous in $0$). In some sense, a measure is only defined on sets and not on points, so if we identify $\mathrm d x$ with the indication of a local volume, then we should rather write $$ ∫ f(x) \,\delta_0(\mathrm{d}x) $$

An other good formalism is the one of the Stieltjes integral (see e.g. https://en.wikipedia.org/wiki/Lebesgue%E2%80%93Stieltjes_integration). In this formalism, if $g$ is a function of bounded variations, then one can define $$ ∫ f\,\mathrm{d}g = \int f(x)\,\mathrm{d}g(x) $$ and actually, since $g$ is of bounded variations if and only if its derivative in the sense of distributions $g'$ is a measure. So, as a distribution, we have $$ \langle g',f\rangle = ∫ f(x) \,\mathrm{d}g(x) $$ (or if you do not know distributions, let say that if $g'$ is integrable then we have $\int f\,g' = ∫ f \,\mathrm{d}g$). So, to have coherent notations, one should write $∫ f\,\mathrm d g$ to indicate that one integrate with respect to the measure $g'$, and not $g$. For example, for the Dirac delta, this gives $$ ∫ f(x)\,\mathrm{d}H(x) = ∫ f(x)\,\delta_0(\mathrm{d}x) = \langle \delta_0,f\rangle = f(0) $$ Here the first integral is well define as a Lebesgue-Stieltjes integral, the second as an integral with respect to a measure and the third as a distribution.