Custom integrals and source terms

I don’t understand what you mean by measure here.
As far as I can tell, you want to integrate the function \theta(0.5-x)\theta(0.5-y) over the whole domain \Omega. This does not require a new measure.

Your definition of dx1 generates an integral measure over all cells whose vertices satisfies

which would be an integral over all cells where x<0.5+tol and y<0.5+tol in your domain.

As you are stating that this is a 3D problem, you are now searching for all facets where both vertices has an x coordinate close to 0.5 (which cannot be satisfied). If you want to implement the point-source at a given degree of freedom, you should locate that degree of freedom and add to the correct position in the rhs. If you want to use a smoothed version of delta, see for instance; Dirac delta distribution (dolfinx) - #3 by dokken