Equation of state for dense gases from a self-consistent-field approach in the framework of kinetic theory