  We reduce the problem of quantization of the Yang-Mills field Hamiltonian to
a problem for defining a probability measure on an infinite-dimensional space
of gauge equivalence classes of connections on $\mathbb{R}^3$. We suggest a
formally self-adjoint expression for the quantized Yang-Mills Hamiltonian as an
operator on the corresponding Lebesgue $L^2$-space. In the case when the
Yang-Mills field is associated to the Abelian group $U(1)$ we define the
probability measure which depends on two real parameters $m>0$ and $c\neq 0$.
This yields a non-standard quantization of the Hamiltonian of the
electromagnetic field, and the associated probability measure is Gaussian. The
corresponding quantized Hamiltonian is a self-adjoint operator in a Fock space
the spectrum of which is $\{0\}\cup[\frac12m, \infty)$, i.e. it has a gap.
