If someone is forced to leave his place and travel for the sake of learning Torah or for earning a livelihood, it is proper that he bear in mind and pray that his journey count as exile, and that he accepts the decree of Heaven with love. In this way, his exile will help atone for his sins, as our Sages said: “Exile atones for sin,” but this is provided that during the trip he guards himself from all evil [and does not sin].
Or, even if someone was not compelled by Heaven to move to another city, it does happen that one has to move to another house, and that too is considered “exile,” so the person should bear that in mind at the time of the move. We see this from the fact that the Sages say that when we leave our homes on the festival of Sukkos to enter the sukkah it is like exile which atones for sins. A person should have this in mind even when he walks from his home to the synagogue or beis ha-midrash on a rainy day and it was difficult for him to leave the warmth of his home, or when he spends the evening in the beis ha-midrash where he is not as comfortable as he would be at home — he should accept all this with love, doing it with joy, and think that it should count as atoning exile.
Another situation that can count as atoning exile is during the days leading up to Pesach, when the houses are cleared out to clean for the checking of chametz, and even the head of the household is forced to sit in a corner out of the way. He should accept it with love and have in mind that it should count as atoning exile. In all similar situations where someone is forced to travel, it can count as atoning exile, provided that the person thinks about it and actually has this in mind and that he accepts it with great love.