Rabbi Elazar deconstructs the title verse to teach us that people must follow the Torah that was given to them by God along with His rebukes and punishments. When someone who has studied the Torah dies, it precedes him and opens all the gates for him to the World to Come. Rabbi Elazar says that God takes most joy in those who get up at night to study the Torah.
The concepts of punishment and reward have no basis in spirituality. If one inadvertently, or even purposely, touches a burning coal and incurs injury, one does not profess to have been punished by the fiery ember. Conversely, if one uses this coal to heat one's home, feed one's family, or bathe oneself in warmed waters, one does not construe this as a reward. It is one's knowledge - or lack of it - that determines its influence in one's life.
Spiritual Light functions under the same principle. Rabbi Elazar is telling us that if we connect to the spiritual current of the Creator through Torah and Kabbalah, we attain spiritual growth and manage these magnificent spiritual forces in a positive, productive fashion. If we connect to spiritual Light through the ego, we inevitably short-circuit and incur injury, be it emotional, physical, or spiritual.
Here we conjoin our souls to the Light in a balanced, safe way. The ego, along with its appetite for self-indulgence, is subjugated. The resulting illumination opens up all the gates that lead to the World to Come - for us, and for all our fellow human beings.
The righteous who have engaged in Torah study in the still of night, all through history, now bestow their blessings upon the reader so that the Holy One's joy reigns over all Creation.