Inscribing Torah Upon Heart
בפסוק לא תשכח מפי זרעו פירש"י הבטחה שאין התורה משתכחת כו'
On the pasuk "for it shall not be forgotten from the mouth of his offspring" (Devarim 31:21), Rashi explains that this is a promise that the Torah will never be entirely forgotten, and so forth.
The Sfas Emes opens with Rashi's reading of the pasuk: Hashem promises that the Torah will never be wholly forgotten from Bnei Yisrael.
אך כ' מפי זרעו וצריכין לשמור הפה והוא שמירת הבל הלב פנימיות של האדם וכן כתיב שימה בפיהם
However, the verse writes "from the mouth of his offspring" — and one must guard the mouth, which means guarding the breath of the heart, the innermost part of a person; and so too it is written "place it in their mouths" (Devarim 31:19).
He notes the verse's precise wording "from the mouth" — teaching that a person must guard his mouth, meaning he must guard the inner breath of the heart, the deepest point within him, paralleling "place it in their mouths."
והוא ענין תורה שבע"פ פי' בעל פה מי שהוא שליט ברוחו ושומר הפנימיות כמ"ש לעיל פי' החותם בתורה
This is the matter of Torah she'be'al peh, the Oral Torah — "al peh" meaning that one who rules over his own spirit and guards his innermost being, as was explained above, is the "sealer" with regard to the Torah.
Torah she'be'al peh, the Oral Torah, belongs to the one who masters his own spirit and protects his pnimiyus; such a person is the one who "seals" the Torah within.
ותורה שבכתב הוא הפותח כמ"ש לעיל
And the Torah she'biksav, the Written Torah, corresponds to the "opener," as was explained above.
Torah she'biksav, the Written Torah, by contrast corresponds to the one who "opens," as the Sfas Emes laid out earlier in the piece.
והיינו כמ"ש כתבם על לוח לבך שמה שלומד נכנס בעומק הלב נק' תורה שבכתב כנ"ל:
And this is the meaning of "write them upon the tablet of your heart" (Mishlei 3:3) — that what a person learns and which enters into the depths of his heart is called Torah she'biksav, the Written Torah, as above.
When a person's learning penetrates into the depths of his heart, that is the "writing" of "write them upon the tablet of your heart" — and this inward inscription is what is called the Written Torah.
Summary: The Sfas Emes builds on Rashi's promise that the Torah will never be forgotten from Bnei Yisrael, focusing on the verse's wording "from the mouth of his offspring." He explains that guarding the mouth really means guarding the breath of the heart, a person's innermost pnimiyus. Torah she'be'al peh, the Oral Torah, belongs to one who rules over his own spirit and protects that inner point — he is the "sealer"; while Torah she'biksav, the Written Torah, corresponds to the "opener." Drawing on "write them upon the tablet of your heart," he teaches that when a person's learning sinks into the depths of his heart, it becomes inscribed within him like the Written Torah, ensuring the Torah endures and is never lost.