The Gemara quotes a verse from Proverbs 20:27:

The soul of man is the lamp of the LORD  Revealing all his inmost parts.

נֵ֣ר יְ֭הוָה נִשְׁמַ֣ת אָדָ֑ם חֹ֝פֵ֗שׂ כָּל־חַדְרֵי־בָֽטֶן׃

Rashi on Tanach explains this verse as follows :

נר ה' נשמת אדם. הנשמה שבקרבו מעידה עליו בדין

On the future day of reckoning after a person passes away his soul records all his deeds and mysteries and thereby provide testimony of his actions in this world.

A very brief discussion about Neoplatonic philosophy is in order because it is almost impossible to understand Rambam, Ralbag and even certain kabbalistic ideas without some basic knowledge of the common mystical traditions that ran through Ancient Greece, Rome and the Jewish sages. Yes, there appears to Be a common mystical tradition. How we can explain this is through either the sharing a wisdom of the sages with other Sagems from different religion that may have happened in the bustling Metropolis of Alexandria in ancient Greece (see Rambam Laws of Sanctification of the New Moon 17:24 for a similar assertion. Another possibility can be that that mankind as a whole shares certain mystical traditions stemming from the times of Abraham, Noah or earlier. The point is though that Jewish mystical tradition was kept out of writing for 2-3 Millennia, unlike other traditions, so until the early middle ages hardly any extensive or detailed Jewish writing about mysticism appeared.  But we do know from the Talmud that there was a mystical tradition as we see described in Chagiga 14b and also in the extant Heikhalot Literature.

The basic idea that is common to Greek and Jewish mystical and philosophical teachings is that the Soul is connected to, part of, or an emanation of a prime consciousness that embodies all knowledge. This prime consciousness might be called Mattatron, the Sechel Hapoel, Active Intellect, or other names based on who is talking, but it is the same essential idea. Beyond the Prime consciousness is the First cause, which is similar to the Kabbalistic Ein Sof, which is beyond any description or knowability. 

The Soul is eternal. Humans can tap into more wisdom by learning to quiet the physical demands of the body so that the subtler expressions of the soul can be felt and channeled from the Active Intellect. ( https://plato.stanford.edu/entries/neoplatonism/ )

The above ideas in one form or another or common to Neoplatonic mystical traditions, Jewish mystical traditions, and Maimonidean Rationalist philosophy. Keep these in mind, and understanding certain Rishonim will be much easier. 

Returning to the verse in Mishle, Ralbag understands it as more reflective and consistent with his Neoplatonic approach to the function of the soul. The soul via its connection to Hashem and the deep truths allows a person who is attuned to the workings of his soul to know and intuit scientific and metaphysical wisdom beyond what can be ascertained via empirical study and logical analysis.

נר ה'. ולבאר מי הוא זה המלך אמר כי נשמת האדם והוא השכל הוא נר ה' והוא חופש כל העמוקות אשר בנמצאות לעמוד על סודם לפי מה שאפשר בעזר הש''י במה שישפיע עליו מאורו וזיוו בו יעמוד על אמתת הדברים העיונים:

That’s interesting because it’s almost exactly what you can find in Tikkunei Zohar 142a

כְּלָיוֹת אִינוּן יוֹעֲצוֹת אִם זָכוּ עָאל בְּהוֹן נְבוּאָה דְאִיהִי (משלי כ כז) נֵר יהו''ה נִשְׁמַת אָדָם, וְאִתְעֲבִידוּ נְבִיאִים, וְאִינוּן יוֹעֲצִים לְטָב, וְאִית בְּהוֹן עִצָה וְתוּשִׁיָּה.

Showing the strange but nonetheless often observable affinity between Kabbalah and Neoplatonic mystical traditions.

for Video Shiur click here to listen:  Psychology of the DAF Pesachim 7