Nuclear mass formula via an approximation to the Hartree—Fock method