In order to derive the Green function for the Klein-Gordon equation, one considers $$ \Box G(x-x')+m^2G(x-x')=\delta^4(x-x') $$ where $\delta^4(x)=\delta(x_0)\delta(x_1)\delta(x_2)\delta(x_4)$. The widely known solution (e.g. see propagator) will depend on distributions like $$ \Theta(x_0^2-x_1^2-x_2^2-x_3^2), \qquad \delta(x_0^2-x_1^2-x_2^2-x_3^2). $$ Therefore, if I substitute the solution back into the equation, it is difficult to see how to recover the more standard $\delta^4(x)$. On the other side, in momentum space, we know how to move from $d^4p$ to $d^3p/(2E)$ and keeping Lorentz invariance. What is the further condition in place for this case?
The rationale behind this question is, given an exact solution of the homogeneous equation, how I could get the Green function? Indeed, it is easy to check that the function $J_1(m x)/x$ is a solution of the homogeneous Klein-Gordon equation.