IIRC, a Hilbert space cannot contain the Dirac delta function regardless of the integral used, since the inner product of the delta function with itself is ill-defined. So what people use in QM is technically &quot;rigged Hilbert spaces&quot; (or Gelfand triples) which a few mathematicians go to great pains to formalise and put on a rigorous foundations. But about which exactly zero shits are given by all the physics departments of the world; they simply handwave about with some box regularizations, swap integrals and limits at their hearts desire, and everything turns out fine in the end.