For the example $f(x,m)=m-x^2$, you can use the formula as in Dirac Delta Function of a Function .
Define $g(x)=y-f(x,m)$.
- If $m>y$, the function $g$ has two zeros, namely $x_{1,2}=\pm\sqrt{m-y}$. Therefore the integral is:
\begin{align}
\int \delta(y-f(x,m))\frac{1}{f(x,m)}dx
&= \frac{1}{f(x_1,m)}\frac{1}{|g'(x_1)|}+\frac{1}{f(x_2,m)}\frac{1} {|g'(x_2)|}
\end{align}
- if $m<y$, the function $g$ has no zeros, so the integral is zero.
- if $m=y$, the function has a double zero at $x=0$, and things get somewhat complicated. Im not going into details here, but maybe look at Dirac delta of a function with zero derivative for some ideas.
This method is correct for any function $f$.
Important note: you do need to determine how many roots the function $g$ has, but you may not need to compute them explicitly. For example you can easily see that
\begin{align}
f(x_1,m)=y-g(x_1)=y
\end{align}
without knowing what the precise value of $x_1$ is. Similar tricks might be possible for the $g'(x_i)$ term. This of course depends on the function $f$, but with polynomials, your chances are somewhat good that you can simplify it somewhat.