These are the famous words of the Mesilas Yesharim as well, in his introduction:
וכפי השיעור אשר כבש את יצרו ותאוותיו ונתרחק מן המרחיקים אותו מן הטוב ונשתדל לדבק בו כן ישיגהו וישמח בו
According to the amount that he controlled his yetzer and his desires, and distanced himself from the things which distance him from the good (Hashem,) and he tried to connect to what is good, to that measure will he be granted the ultimate good and enjoy it!
Being that Hashem decreed that the physical self and the neshamah need to separate and part ways for a while, so that the guf can be destroyed and eventually rebuilt in the world of techiyas hameisim, there is a time-lapse where the neshamah and guf are separate. During this time each one has their place. The guf’s place is in the earth, so that is can decompose and rebuild, as Hashem decreed, כי עפר אתה ואל עפר תשוב. The neshamah has a place in the ‘olam haneshamos,’ the world of the neshamos, (which we colloquially call Gan Eden,) during which time the neshamah basks in the presence of Hashem and enjoys a ‘me’ein’, a fraction of what it will eventually enjoy after techiyas hameisim in ‘Olam Habah.’
Of course, during this time as well, each neshamah enjoys the connection to ‘tov’ and the presence of Hashem according to the level which they prepared themselves on this world. If a person worked to connect to Hashem in this world, in the world of the neshamos as well, they will benefit according to their effort. But the final and true shelaimus, perfection and connection to Hashem, is only achieved in Olam Habah, the world-to-come, after techiyas hamaisim.
The neshamah and eventually the guf, have a great benefit from this time in the ‘olam haneshamos.’ What the Ramchal explains here is fascinating. Gan Eden, which is the place for the neshamos, is like a ‘beit hachlamah,’ for the neshamah, a rehabilitation clinic. He explains as follows. Once Hashem decreed that death is inevitable, and it is impossible for the neshamah to do its part in perfecting the guf, this caused damage to the neshamah itself. There are three aspects to this. One, the neshamah is connected to the guf which is physical and lacking, and far from spirituality – this affects the neshamah negatively. Second, the neshamah is prevented from truly shining and expressing its beauty and kedushah, as long as it is connected to the guf. Although when we do mitzvos and good deeds, this brings more light into our souls and elevates us greatly, nonetheless, the neshamah is still largely held back by the guf from truly expanding and growing with the holiness it possesses. It is repressed and bottled-up, fully inhibited by the limitations of the guf. The guf itself loses because of this, since the true purpose of the neshamah was to purify and perfect the guf, but after the ‘chait’ this isn’t possible without the death process. Third, the neshamah loses out by not being able to perfect the guf, because perfecting something or someone else is the only true shelaimus!
This is a fascinating application of a known concept. We understand and the Ramchal has explained to us that true ‘good’ and perfection is by giving to others. This concept is being applied to the relationship between the guf and the neshamah – the neshamah reaches its own personal perfection by perfecting the guf! It can’t do that in this world, and therefore it is negatively affected by that. Essentially, the nature of the neshamah is to perfect the guf, and when it is prevented from doing what is intrinsic to its nature, it is affected as well.