Evil is not exterminated by Regeneration, but only separated to the Circumferences, and remains to Eternity.
The evil in the man who is regenerated, either actual or hereditary, is not exterminated, so that it passes away or becomes none, but is only separated, and through disposition by the Lord is cast out into the circumferences. It thus remains with him, and this to eternity; but he is withheld by the Lord from the evil, and is kept in good. When this is the case it appears as if the evils were rejected and the man purified from them, or as they say, justified. The angels of heaven all confess that what is in them so far as it is from themselves is nothing but evil and the falsity therefrom, but so far as it is from the Lord it is good and truth from good. They who have conceived another opinion on this subject, and when they lived in the world confirmed in themselves, from their doctrinal, [a belief], that they are justified and are then without sins, and thus that they are holy, are remitted into the state of evils from the actual and the hereditary [in them], and are kept in it until they know by living experience that of themselves they are nothing but evil; and that the good in which they had seemed to themselves to be was from the Lord, and therefore was not theirs but the Lord's. So it is with the angels, and so with the regenerate among men. (A. C. n. 4564)
There are some men who after death are elevated by the Lord into heaven, because they have lived well, but who yet have carried with them the belief that they are clean and pure from sins, and that therefore they are not chargeable with any guilt. They are at first clothed in white raiment according to their belief; for white garments signify a state purified from evils. But afterwards they begin to think as in the world that they are as it were washed from all evil, and to glory therefore in the idea that they are no longer sinners like others,—which can hardly be separated from some elation of mind, and some contempt of others in comparison with themselves. In order therefore that they may be withdrawn from their imaginary belief, they are then sent away from heaven, and remitted into their evils which they had contracted in the world; and at the same time it is shown them that they are also in hereditary evils, of which they had before known nothing. And after they have thus been compelled to acknowledge that their evils are not separated from them, but only removed; that therefore of themselves they are impure, yea nothing but evil; that they are withheld from evils and kept in goods by the Lord; and that this [only] appears to them as if it were of themselves; they are again elevated by the Lord into heaven. (D. P. n. 279.)