Exact Hamiltonian for an analytic correlated ground-state wave function for He-like ions