...These days will be transformed into days of Joy! (Yirmiya 8,19)
... I received your letter in which you ask the question "if a soul has come back to earth several times to complete its duty here, when Moshiach comes in which form will the soul come back?" ...
... As for your question, it was already asked a very long time ago by one of our great teachers of the Talmud, Rabbi Chizkiah, as mentioned in the holy Sefer Zohar (Part 1, page 131a). The answer given there by another great teacher of the Mishnah, Rabbi Yosey, is that the soul will come back to life in the body in which it has accomplished Torah and Mitzvos during her lifetime on this earth, and that a body which did not practice Torah and Mitzvos on earth will not come back to life. This answer must be considered in the light of a further explanation by the great Rabbi Isaac Luria [AriZal]... The saintly Ari explained that it is almost impossible for a Jew not to fulfill at least some Mitzvos.
Therefore, in accordance with the answer in Zohar, almost all bodies will come back to life. The question then is in which body will the soul return if it had been in more than one body. The answer, strange as it may seem at first glance, is that it will return in all the bodies it had inhabited. To understand how this is possible, let us remember that the souls of mankind started from two people, Adam and Eve. Their souls included all the souls of the future generations, in a way a single seed includes in it, future generations of trees, fruits, and seeds. In the same way, the souls of parents are not just two souls, but they can split up into soul sparks, each of which is in turn a complete soul.
Therefore, when a Jew performs a Mitzvah, the body takes part in it and it is no longer "dry wood" that rots away, but it will come back to life with a soul which is a Divine spark, and which was included in the original soul. Thus, at the Time of Resurrection (after Mashiach will come) all "parts" of a "general" soul will each have a separate body, just as parents will come back to life with all their children...