The gemara tells us that there is special merit in adjoining geula (the blessing gaal yisrael following the shema) to t’fila (the amida prayer), meaning that he makes no interruption in between (B’rakhot 4b,9b). And this is the ruling of the Shulchan Arukh (OC 66:8, 111:1, 235).
The Zohar mentions this rule in our parsha (I 205b), and while the passage there doesn’t connect it to the events of our parsha, a number of commentators do.
In the commentary cited by Yedid Nefesh, Yehuda represents geula. This is logical because geula or redemption is naturally associated with kingship, as the essence of our redemption is the restoration of Jewish sovereignty. This in turn is identified with Yehuda, who was promised kingship by Yaakov (B’reshit 49:10) and was the progenitor of King David, from whose line will arise the Moshiach.
Yehuda’s approach to Yosef is parallel to the approach of the blessing of redemption to prayer. His appeals and pleadings before Yosef represent the need to justify and defend the Jewish people prior to standing before Hashem in prayer. The implication is that this is accomplished by the recitation of shema and its blessings, which augment and recount the merits of the Jewish people particularly at the time of the Exodus.
The Sefat Emet has a similar commentary, but the roles are different. Yehuda and the house of David represent prayer, which is the service of the heart (as we find in Taanit 2a). This is presumably because we find Yehuda and David being emotional and open in their actions. By contrast, Yosef represents the brain, or rational thought. This may be because Yosef appears in the Torah to be more cerebral and calculating, or perhaps because in the encounter in our parsha Yosef is in a position of superiority, just as the brain ultimately rules over the emotions. This in turn corresponds to the recitation of shema, which the Sefat Emet describes as “hearing in the brain”.
The approach of Yehuda to Yosef is thus understood as follows: The heart or emotions is in some sense intermediate between the body, or lower faculties, and the brain. On the one hand we feel emotionally the pains and sorrows of the body. On the other hand, our emotions are also capable of finding joy in the deeper understanding of our mental faculties.
As a moral lesson, this means that while our emotions need to be connected to our material experience, we also have to elevate them and teach them to appreciate the higher joys which are detached from our material existence and connected to our higher faculties, particularly our Torah learning. (While the Sefat Emet doesn’t say this explicitly, it seems clear to me that when he refers to our mental faculties and identifies them with shema and with “hearing in the brain” he means our Torah insights.)
In the context of adjoining geula to t’fila, this would mean that while our prayers have to express our wants and needs, the many sorrows we feel, it has to approach also our higher faculties, in particular our Torah learning, represented by kri’at shema. This will bring us to the highest level of prayer with joy, which we can particularly attain on Shabbat. (Sefat Emet, Vayigash 5665)