A good answer is provided by Rav Chaim Shmulevitz zt"l in his Sichos Mussar, Maamar 16. He describes how Yosef had experienced a great deal of trauma - he was the 'ben zekunim' (the son of old age) of his father, who was now being sold into slavery, heading to Egypt which was entrenched in tumah (impurity). It was pretty much impossible to escape from a ...
The Yalkut Shimoni, Remez 146 demonstrates that this image was more than just an image, it was Divinely induced, as Hashem Himself, as it were, came in the guise of Yaakov avinu.
The Midrash there writes:
כיון שבא ליזקק לה בא הקב"ה בדמות אביו ונתקררה אמתו שנאמר ותשב באיתן קשתו אמרה לו מה לך אמר לה אבא אני רואה. אמרה ליה והיכן הוא ואין איש ...
Sources are as follows:
1) He met Yosef whilst he was looking for his brothers and directed him, only for him to then get sold into slavery:
It says in Bereishis 37:15:
וַיִּמְצָאֵ֣הוּ אִ֔ישׁ וְהִנֵּ֥ה תֹעֶ֖ה בַּשָּׂדֶ֑ה וַיִּשְׁאָלֵ֧הוּ הָאִ֛ישׁ לֵאמֹ֖ר מַה־תְּבַקֵּֽשׁ׃
And a man found him, and, behold, he was straying in the field. And the man asked him: ...
Gemara Megillah (10b) is the source of the concept you mention, saying
אמר רבי לוי ואיתימא רבי יונתן דבר זה מסורת בידינו מאנשי כנסת הגדולה
כל מקום שנאמר ויהי אינו אלא לשון צער - we have a mesorah that any
mention of the word "Vayehi" is a reference to pain.
The Alshich (39:2) seems to address your point explaining each "Vayehi"
Bechasdei Hashem Yisborach, I found the source for it in the sefer Kol Simcha of Reb Simcha Bunim himself, it's the third piece in parshas Vayeshev:
וזה פירוש לך נאה ראה את שלום אחיך שתראה שלמותם ולא חסרונם
It is written with more clarity in the Tiferes Shlomo of Reb Shlomo Hakohen Rabinowicz of Radomsk in parshas Vayeshev:
לר נא ראה את שלום אחיך ואת ...
In Rabbi Jachter's Depths of Yonah, he writes:
"The Torah records that the caravan that transported Yosef to slavery in Egypt was carrying fragrant spices such as balsam and lotus. Chazal and Rashi wonder why the Torah records this seemingly-trivial detail, which appears entirely irrelevant to the story. Why does Hashem feel it is important for us to ...
A good answer is the fact that Yosef served as a constant reminder of Yaakov's beloved wife Rochel. This is because as the sources show, Yosef looked very much like his mother, and inherited her good looks.
In Bereishis Rabbah 86 it writes:
אָמַר רַבִּי יִצְחָק זְרוֹק חֻטְרָא לְאַרְעָא וְעַל עִקָּרֵיהּ נָפִיק, לְפִי שֶׁכָּתוּב (בראשית כט, יז): וְרָחֵל ...
Sotah is using the allegorical nomenclature of the midrash in your quotation. It is discussing a kind of mystical, meditative practice. In this case, his image or icon (דיוקנו) is referring to the letters of Yaacov Avinu's name, meaning: י״עקב. That the letter Yud connects to heel עקב.
The word in a window בחלון is understood as in a dream בחלום (that Yosef ...
The simple answer is that, as in most cases, Rashi is simply citing a Midrash. Bereishit Rabbah (Parshah 86) says:
ויעזוב את כל אשר לו ביד יוסף כי אם הלחם אשר הוא אוכל, לשון נקי
This is Rashi following his style of not being a strict pashtan, but instead incorporating midrashim into the Biblical narrative. Indeed, those rishonim who are more strict ...