Recall, from Hatfield's textbook (QFT of point particles and strings) & Jackiw's review that the functional equation you are emulating is just that, a functional equation the extension of an infinite sum of canonical pairs $[q_i,p_j]=i\hbar \delta_{ij}$ to
$$ [\phi(x),\pi(y)]\propto \delta(x-y). $$
So, just as the Hamiltonian in QM deals with all degrees of freedom, just so in QFT,
$$
H\psi[\phi]= \int\!\! d^3 x \left (-\frac{\delta^2}{\delta\phi(x)^2} +\phi(x)O\phi(x)+... \right )\psi[\phi],
$$
where the ellipses (...) suggests cubic and higher terms in the potential, rarely used. $O$ is a normally nonlocal operator, i.e., $$
O \phi(x) = \int \! d^3y ~O(x-y) \phi(y),
$$
such as $O=m^2-\nabla^2$, etc. I've left the time dependence implicit throughout.
It is then evident that the ground state of the quadratic Hamiltonian is
$$
\propto e^{-\tfrac{1}{2} \int d^3z ~\phi(z) \sqrt{O} \phi(z) },
$$
but you must attend to the δ-functions.
When confused, try to consider uncoupled oscillators, i.e. $O$ a constant.
PS if you insist on using functions instead of functionals, you can always convert the latter to the former by sticking in gonzo gratuitous delta functions,
$$
H'[\phi]=\int d^3 x ~~{\cal H}(x) \delta (x-y)= {\cal H}(y),
$$
but why??
A more explicit definition for $\sqrt O$ is clearest in 1d space. For
$$
\sqrt{O}\phi(x)\equiv \int\! dy~ K(x-y)\phi(y). ~~~\leadsto \\
O\phi[x]= \sqrt{O}\sqrt{O}\phi(x) =\int\! dydz~ K(x-y) K(y-z)\phi(z) ~~~\implies \\
O(x-z)= \int\! dy ~~K(x-y) K(y-z),
$$
the equation defining the kernel of the square root.