QED calculation of the ground-state energy and the ionization