[1 of 3] Swedenborg (1688-1772, Sweden): primary subject "Afterlife, harmony enforced in" (search under Outer Life/Doctrine, Rites, Scriptures)": source "Arcana Coelestia, vol.1": detail "Section 1106"
There are many persons who, during their life in this world, from simplicity and ignorance have imbibed falsities of religious belief, and yet have had a kind of conscience in accordance with the principles of their faith, and have not like others lived in hatred, revenge, and adultery. In the other life these persons cannot be introduced into heavenly societies so long as they remain in these falsities, for they would contaminate them; and they are therefore kept for a time in the lower earth, in order that they may get rid of their false principles. The time that they remain there is longer or shorter according to the nature of the falsity, and the life contracted thereby, and according to the degree in which they have confirmed themselves in their principles. Some suffer there severely, others not severely. These sufferings are what are called Vastations, of which there is frequent mention in the Word [Bible]. When the period of vastation is completed, they are taken up into heaven, and, as new comers, are instructed in the truths of faith, and this by the angels by whom they are received.

[2 of 3] Swedenborg (1688-1772, Sweden): primary subject "Afterlife, harmony enforced in" (search under Outer Life/Doctrine, Rites, Scriptures)": source "Arcana Coelestia, vol.9": detail "Section 7795"
That the evil undergo so many states before they are damned and sent into hell, is entirely unknown in the world. It is believed that man is immediately either damned or saved, and that this is effected without any process. But the case is otherwise, justice reigns there, and no one is damned till he himself knows and is interiorly convinced that he is in evil, and that he is utterly incapable of being in heaven. … And what is more, he is also admonished to desist from evil; but when he cannot do this by reason of the dominion of evil, he is deprived of the power of doing evil by means of falsifications of truth and simulations of good, which is effected successively from one degree to another, and at length follows damnation and the letting-down into hell; this takes place when he comes into the evil of his life.
 Evil of the life is evil of the will and of the thought thence; thus it is such as man interiorly is, and such as he would be exteriorly, were he not hindered by the laws and by the fears of the loss of gain, of honor, of reputation, and also of life. This is the life which follows every one after death, but not the external life, except that which proceeds from the internal life; for in externals man simulates what is contrary; wherefore, when man after death is vastated as to externals, it then becomes evident of what character he had been both in will and thought. To this state every evil person is reduced by degrees of vastation; for all vastation in the other life progresses from externals to internals. From these considerations it may appear what is the character of justice in the other life, and what is the character of the process that precedes the damnation of any evil person.

[3 of 3] Swedenborg (1688-1772, Sweden): primary subject "Hell, Hades" (search under Afterlife/Afterlife, Heaven, Hell)": source "Heaven and Hell": detail "Section 551"
All who are in the hells are in evils and in falsities therefrom, and no one there is in evils and at the same time in truths. In the world evil men for the most part have some knowledge of spiritual truths, which are the truths of the church, having been taught them from childhood and later by preaching and by reading the Word [Bible]; and afterwards they have talked about them. Some have even led others to believe that they are Christians at heart because of their knowing how to talk with pretended affection in harmony with the truth, also how to act uprightly as if from spiritual faith. But those of this class whose interior thoughts have been hostile to these truths, and who have refrained from doing the evils that were in harmony with their thoughts only because of the civil laws, or with a view to reputation, honors, and gain, are all of them evil in heart, and are in truths and goods not in respect to their spirit but only in respect to their body; and consequently, when their externals are taken away from them in the other life, and their internals which pertain to their spirit are revealed, they are wholly in evils and falsities, and not at all in truths and goods; and it is thus made clear that truths and goods resided only in their memory merely as things known about, and that they brought them forth therefrom when talking, putting on a semblance of good seemingly from spiritual love and faith. When such are let into their internals and thus into their evils they are no longer able to speak what is true, but only what is false, since they speak from evils; for to speak what is true from evils is then impossible, since the spirit is nothing but his own evil, and from evil what is false goes forth. Every evil spirit is reduced to this state before he is cast into hell. This is called being vastated in respect to truths and goods. Vastation is simply being let into one's internals, that is, into what is the spirit's own, or into the spirit itself.