  We consider the ADM splitting of the Einstein-Hilbert action in five
dimensions in the presence of matter that can be either a "point particle", or
a set of scalar fields. The Hamiltonian, being a linear superposition of
constraints, is equal to zero. Upon quantization, we obtain the Schr\"odinger
equation for a wave functional, \Psi, that depends on the matter degrees of
freedom, and on the 5D gravity degrees of freedom. After the Kaluza-Klein
splitting, the functional Schr\"odinger equation decomposes so that it contains
a part due to 4D gravity, a part due to electrodynamics, and a part due to
matter. Depending on choice of the matter term, we obtain two different
versions of a modified quantum electrodynamics. In one version, time
automatically appears, and there is no problem with infinite vacuum energy
density of matter fields, whereas in the other version such problems exist.
