With this, there is a question: It appears that it is better for him (his Nefesh) to enter into Gehinom to clean up all of his sins, and not to return many times in Gilgulim. [R' Chaim Vital says that] It appears according to my understanding to explain that [Gilgul is actually better than Gehinom, because through Gilgul, he can merit by doing the mitzvos and good deeds that he would do in the next body.
However, for this Rasha,] Hashem looks into him and recognizes that this Rasha -- if he returned into another Gilgul -- he would only add onto his sins. He would also multiply his sins over his merits. Therefore, he sees that if he already completed the mitzvot that were required of him according to where he is in the source of his Nefesh, [it would be better for him to leave the world,] and so he leaves this world and he enters into Gehinom in order to clean his sins.
Thus, his merits remain complete, "כי חפץ חסד הוא." However, with the Tzaddik (where his sins are fewer than his merits), they are cleaned through all the different types of hardships and sufferings that he would experience through Gilgulim. And, his merits remain with him and are multiplied and added to with each Giglul ad infinitum. Also, his reward is beautiful, according to what has been said by the Rabbis z"l, that "Hashem wanted to merit Yisrael, therefore he multiplied on them Torah and Mitzvos."