In physics this is a frequent device when we wish to quantize the electromagnetic field. We encounter Dirac delta functions $\delta(\omega-\omega')$ and need to make sense of the case $\omega=\omega'$. The way out is to imagine that the whole of space is enclosed in a cavity, with discrete frequencies $\omega_p=p\Delta$, $p=1,2,\ldots$, and then the Dirac delta becomes a Kronecker delta,
$$\delta(\omega_p-\omega_p')=\Delta^{-1}\delta_{pp'},$$
so $\delta(0)=\Delta^{-1}$. At the end of the calculation we can then send the size of the cavity to infinity, so $\Delta\rightarrow 0$, and if we are calculating physically meaningful quantities this limit will be finite.