I am seeking to evaluate an integral of the form $\int_0^\infty f(x)\exp(\frac{-x}{z})dx$ where z has units of distance (meters) and f(x) is unitless. f(x) has two forms, as either a constant with respect to x (e.g. 1) or as $\delta(x-x_0)$. When evaluating these two forms, I noticed that the units of my answer have changed. In the $f(x)=1$ case the integration produces $-z*\exp(\frac{-x_0}{z})$, which has units of distance (meters). In contrast for $f(x) = \delta(x-x_0)$ my understanding is that the answer is $\exp(\frac{-x_0}{z})$. Without the -z term, my units have changed. This is the numerator of a ratio with a denominator in meters, so suddenly my ratio is not unitless, and physics fails. Have I missed some point of the underlying math where my units are preserved in both cases?
Thanks in advance.
The Dirac delta function $\delta (x-x_{0})$ has the unit of $(distance)^{-1}$, or $m^{-1}$ in your case.