Jacob was the firstborn of the Holy One, as it is said, "Israel is My firstborn son" (Exodus 4:22). How greatly he rejoiced! He saw a ladder, and "the angels of God ascending and descending" (Genesis 28:12) and gazing upon him, while the Holy One stood above him, as it is said, "And behold, the LORD stood over him" (Genesis 28:13). Then he went to Laban and fled from before Esau, and he became a servant to Laban for twenty years, and at the end he grew wealthy, and he fathered sons, and he returned in peace. And he met Esau and was delivered from him, and he paid his vow. Yet in the end his joy did not endure, but rather, "And Dinah went out" (Genesis 34:1), and the trouble of Joseph came upon him. Now if Jacob the Righteous, a man to whom the Holy One had said, "in whom I will be glorified," as it is said, "Israel, in whom I will be glorified" (Isaiah 49:3) did not remain in his joy, then the wicked, how much more so! [Therefore it is said, "I said to the merrymakers: Do not make merry" (Psalms 75:5).]
Jacob the Firstborn Whose Joy Did Not Endure
Midrash Tanchuma Buber, Shmini 3:5
יעקב בכורו של הקב"ה, שנאמר בני בכורי ישראל (שמות ד כב), כמה שמח, ראה סולם, ומלאכי אלהים עולים ויורדים (בראשית כח יב) ומביטים בו, והקב"ה עומד למעלה ממנו, שנאמר והנה ה' נצב עליו וגו' (שם יג). והלך אצל לבן וברח מפני עשו, ונעשה עבד ללבן עשרים שנה, ולסוף העשיר, והוליד בנים, וחזר בשלום, ופגע בעשו וניצול הימנו, ושילם את נדרו, ובסוף לא המתין בשמחתו, אלא ותצא דינה וגו' (שם לד א), ובאתה לו צרת יוסף, ומה אם יעקב הצדיק, אדם שאמר לו הקב"ה אשר בך אתפאר, שנאמר ישראל אשר בך אתפאר (ישעיה מט ג), לא המתין בשמחתו, הרשעים על אחת כמה וכמה, [לכך נאמר אמרתי להוללים אל תהולו].