  A many-body wave function is approximated by a product of two functions: the
wave function $\phi$ depending on the particle coordinates and the function
$\chi$ depending only on the value of interparticle interaction potential. For
the given $\phi$ an ordinary linear differential equation for $\chi$ is derived
by averaging the Hamiltonian over the constant interparticle interaction
potential surface. Generalized Hartree-Fock equations containing correlation
effects are obtained. To test the proposed technique the ground $1^{1}S_0$ and
excited $2^{3}S_1$ states of two-electron ions from H$^-$ up to Ne$^{8+}$ are
calculated. In all cases the calculated energies are more accurate than those
obtained with the Hartree-Fock theory even taking as $\phi$ the symmetrized
product of electron wave functions in the Coulomb field of nucleus complitly
disregarded the electron-electron interaction. Variation of factors in the
one-particle wave function exponents leads to the results close to those of
configuration interaction approach.
