Nonsingular electrovacuum solutions with dynamically generated cosmological constant