When G-d wants Divine Justice to function outright on a day to day basis, He has it play itself out within the system of reward and punishment that we fully expect. That’s when good people enjoy peace of mind, well-being, and some modicum of prosperity for having done all the right things, while bad people suffer the opposite for having done wrong again and again .
Life itself seems “right”, “fair”, and “just” then, and few of us question G-d’s ways under those circumstances. The point is to be made, though, that when that system is in place humankind is clearly open to goodness or wrongfulness, and is responsible for its ethical decisions.
That won’t be the case, though, when G-d eventually exhibits His overarching mercy and beneficence. We’d be utterly incapable of doing harm or suffering the consequences of them when that functions, because wrong and injustice will simply no longer exist . We’ll be exalted beings then who will be “beyond” free will and incapable of wrong..
Given these two different realities, it’s clear then that man’s ethical standing depends on our interactions with G-d’s presence. For, while we’re capable of lowliness when G-d’s presence is more hidden, we’re only capable of sure loftiness when His presence is manifest.
Still and all, G-d seems to have laid a trap for us by placing us in this material world with all of its prospects for wrongdoing. But as we’d said several times, He did that to allow us the free will we’d need to draw close to Him of our own volition.
In point of fact, the material world isn’t all darkness and risk. There are heaps and heaps of Divine Light strewn all about it, to be sure. And many, many things are a blend of light and dark with enough light in the mix to make all the difference. After all, there’s honestly motivated intellectual curiosity and stark wonder here, there’s Torah (which fosters a wholly other class of intellectual curiosity and wonder), instances of Divine Inspiration , and there are all sorts of phenomena here that are not altogether in keeping with materiality (including love).
And so the world is a fulsome concoction of light and darkness, of the holy and the profane. The essential difference between them is the degree of G-d’s presence: the more electric and sure the experience of His presence and beneficence, the holier the event; and the less electric and sure, the more mundane.
Interestingly enough what we derive from that is the notion that when G-d wants the world to function under a system of justice He subsumes His own actions to humankind’s, in a manner of speaking. For when we’re good He reacts one way, yet He reacts another way when we’re bad; as if it were we who were leading this dance and He were taking direction from us if one would dare say as much. When the time comes for G-d to allow His full mercy to rule and His presence to be manifest, though, His sovereignty will reign supreme and He won’t “need” to react to anything whatsoever, and everything will be fully sanctified.
 Understand of course that this is a black and white portrayal; that most of us are both righteous and wrongful by degrees; and that bad things do indeed happen to the good and vice versa. The point is that when Divine Justice holds sway, each and every act of goodness is indeed rewarded and every act of wrong is recompensed for one way or another whether we know it or not.
For Kabbalistic references see R’ Friedlander’s note 365 and R’ Shriki’s note 119.
 It might seem unfair, too “liberal” of G-d to our minds for Him to manifest so much mercy that wrongdoing would go unpunished at that point. But the truth is that we ourselves will be of a whole other stripe and would consider that simply just.
 Ramchal’s himself enjoyed a large measure of Divine Inspiration (aside from the sort that all gifted and especially astute students of Torah enjoy). As is widely know, a “Maggid” (an angelic presence) presented itself to Ramchal when he was a young man who solved many Torah mysteries for him, and guided his writings and thoughts.
Rabbi Yaakov Feldman has translated and commented upon “The Gates of Repentance”, “The Path of the Just”, and “The Duties of the Heart” (Jason Aronson Publishers). His works are available in bookstores and in various locations on the Web.