So in a physical problem, I am expected to solve integrals of the form
$$ \pmb{f}(\pmb{r}) = \int_V d^N \pmb{q} \int_0^1 d \lambda \; g(\pmb{q}) \delta(\pmb{r} - \lambda \pmb{q}) $$
In the paper that I'm looking at, they provide an examples of solved integrals (without any deeper discussion whatsoever)
$$\pmb{f}(\pmb{r}) = \int_V d^N \pmb{q} \int_0^1 d \lambda \; \left(- \frac{b}{\pi a^3} e^{-2 q /a} \pmb{q} \right) \delta(\pmb{r} - \lambda \pmb{q}) = \frac{-b \pmb{\hat{r}}}{4 \pi r^2 } \left( 1 + 2 \frac{r}{a} + 2 \frac{r^2}{a^2} \right) e^{-2 q/a} $$
Here, $\pmb{q}$ is to be taken as the 3D spherical coordinates with $q$ being the radial component (not called $r$ as to avoid confusion). I can handle the vector algebra and the integrations pretty well in general, so by no means I am asking for help with the integral itself, but the Dirac delta part I just can't wrap my head around.
I guess if I had an integral of the type $ \int dx \int_0^1 d \lambda \; g(x)\delta(x - \lambda y) $ then I could consider the integral to be a "sum" of Dirac delta contributions ranging from $x=0$ to $x=y$, so I might be tempted to write it as
$$ f(y) = \int dx \int_0^1 d \lambda \; g(x)\delta(x - \lambda y) = \int_0^y dx \; f(x), $$
that is basically integrating against a "window function" as opposed to just a point delta.
However, in my specific example the variable being switched on is not an independent variable but the integration variable itself. In the simplified notation I guess it would be
$$ f(y) = \int dx \int_0^1 d \lambda \; g(x)\delta(y - \lambda x) $$
So I think my question should be: how do I solve an integral of this type?
Without knowing $g$ this is as far as I come: $$ \pmb{f}(\pmb{r}) = \int_V d^N \pmb{q} \int_0^1 d \lambda \; g(\pmb{q}) \delta(\pmb{r} - \lambda \pmb{q}) = \int_0^1 d \lambda \int_V d^N \pmb{q} \; g(\pmb{q}) \delta(\pmb{r} - \lambda \pmb{q}) = \{ \pmb{q}' = \lambda\pmb{q} \} \\ = \int_0^1 d \lambda \int_V \lambda^{-N} d^N \pmb{q}' \; g(\lambda^{-1}\pmb{q}') \delta(\pmb{r} - \pmb{q}') = \int_0^1 d \lambda \; \lambda^{-N} g(\lambda^{-1}\pmb{r}) . $$