Heuristically we have
\begin{align*}
\int g \frac{d\delta}{df}(f) \, dt
&= \int g \frac{d\delta}{df}(f) \frac{dt}{df} \, df
= \int \frac{g}{f'} \frac{d\delta}{df}(f) \, df \\
&= - \int \frac{d}{df}\bigg(\frac{g}{f'}\bigg) \delta(f) \, df \\
&= - \int \frac{dt}{df}\frac{d}{dt}\bigg(\frac{g}{f'}\bigg) \delta(f) \, df \\
&= - \left. \frac{1}{f'}\bigg(\frac{g}{f'}\bigg)' \right|_{f=0}.
\end{align*}
But this is just a deceptive heuristics and we have to justify (and also calibrate) this result in mathematical language. To this end, suppose that $f$ be smooth, that $g \in C_{c}^{\infty}(\Bbb{R})$ and that $g$ decays fast enough not to raise any integrability issue. Also, let $x_j$ be zeros of $f$ and assume that they are simple zeros of $f$: $f'(x_j) \neq 0$. Then there exists a disjoint family of open neighborhoods $U_j$ of $x_j$ such that $f$ is invertible on $U_j$ with a local inverse, which we denote $f^{-1}$ whenever no ambiguity arises. Then
\begin{align*}
\int_{\Bbb{R}} g \frac{d\delta}{df}(f) \, dt
&= \int_{\Bbb{R}} g(t) \delta'(f(t)) \, dt
= \sum_{j} \int_{U_j} g(t) \delta'(f(t)) \, dt \\
&= \sum_{j} \int_{f(U_j)} g(f^{-1}(u)) \left| (f^{-1}(u))' \right| \delta'(u) \, du \qquad (u = f(t)) \\
&= - \sum_{j} \mathrm{sgn}\,(f^{-1}(u))' \cdot \int_{f(U_j)} \big[ g(f^{-1}(u)) (f^{-1}(u))' \big]' \delta(u) \, du \\
&= - \sum_{j} \mathrm{sgn}\,(f^{-1}(u))' \cdot\left.\big[ g(f^{-1}(u)) (f^{-1}(u))' \big]'\right|_{u=0}
\end{align*}
Here, we exploited the following property
$$ \int_{\Bbb{R}} \varphi(x) \delta'(x) \, dx = - \int_{\Bbb{R}} \varphi'(x) \delta(x) \, dx = -\varphi'(0), \quad \varphi \in C_{c}^{\infty}(\Bbb{R}). $$
Now, simple calculation shows that
$$ \big[ g(f^{-1}(u)) (f^{-1}(u))' \big]' = \frac{f'(t) g'(t)-g(t)f''(t)}{f'(t)^3}, $$
where $t = f^{-1}(u)$. Finally, by noting that $f$ increases on $U_j$ if and only if $f^{-1}$ increases on $f(U_j)$, it follows that $\mathrm{sgn} \, (f^{-1})'(0) = \mathrm{sgn}\,f'(x_j)$. Therefore we have
\begin{align*}
\int_{\Bbb{R}} g \frac{d\delta}{df}(f) \, dt
&= - \sum_{j} \mathrm{sgn} \, f'(t) \cdot \left. \frac{f'(t) g'(t)-g(t) f''(t)}{f'(t)^3} \right|_{t=x_j} \\
&= - \sum_{j} \left. \frac{1}{\left| f'(t) \right|} \bigg( \frac{g(t)}{f'(t)} \bigg)' \right|_{t=x_j} \\
\end{align*}
as desired.
Edit. Following jbc's advice, I made amends to the sign problem. I realized this problem few days ago, but forgot fixing until he/she pointed it out explicitly. It is to blame my short-term memory :( And also thanks, jbc!