וְעָ֥בַר בָּ֖הּ נִקְשֶׁ֣ה וְרָעֵ֑ב וְהָיָ֨ה כִֽי־יִרְעַ֜ב וְהִתְקַצַּ֗ף וְקִלֵּ֧ל בְּמַלְכּ֛וֹ וּבֵאלֹהָ֖יו וּפָנָ֥ה לְמָֽעְלָה׃
און דורכגײן װעט דורך דאַנעןאַ געדריקטער און אַ הונגעריקער; און עס װעט זײַן, אַז ער װעט הונגערן, װעט ער צערענען, און װעט שילטן זײַן מלך און זײַן גאָט; און ער װעט זיך קערן צו דער הײך,
Mekhilta DeRabbi Yishmael
R. Akiva says: "You shall not do (i.e., deport yourselves) with Me" as others do with their gods. When good befalls them, they honor their gods, viz. (Habakkuk 1:16) "Therefore, he sacrifices to his "nets" (i.e., to his idols, which "net" him riches). And when evil befalls them, they curse their gods, viz. (Isaiah 8:21) "… and he will curse his king and his gods." But, as for you, if I bring good upon you, you give thanks, and when I bring afflictions upon you, you give thanks. And thus did David say (Psalms 116:3) "the cup of salvation shall I raise, and in the name of the L-td will I call" — (Ibid. 4) "Trouble and sorrow will I find, and in the name of the L–rd shall I call." And thus, Iyyov says (Iyyov 1:21) "the L–rd has given and the L–rd has taken — Let the name of the L–rd be blessed!" Both for the good and for the evil. What does his wife say to him? (Ibid. 2:9) "Do you still hold on to your innocence? Blaspheme G–d and die!" He answers (Ibid. 10) "You speak as one of the lowly ones!
Midrash Tanchuma
Ye shall not do with Me as you do with gods of silver (Exod. 20:20). Do not act toward Me as men do toward those whom they fear. When good fortune comes to them, they honor those they fear, as it is said: Therefore they sacrifice unto their net, and offer unto their drag; because by them their portion is fat, and their food plenteous (Hab. 1:16). However, when afflictions befall them, they curse those they fear, as it is said: And it shall come to pass that, when they shall be hungry, they shall fret themselves, and curse by their king and by their god (Isa. 8:21). However, you shall praise Me both for fortune and for misfortune. Thus David said: I will fill up the cup of salvation, and call upon the name of the Lord (Ps. 116:13), whether for good or for evil. Then said his wife unto him: “Dost thou still hold fast thine integrity? Blaspheme God, and die!” But he said unto her: “Thou speakest as one of the impious women speaketh. What? Shall we receive good at the hand of God, and shall we not receive evil?” (Job. 2:9–10). A man should rejoice over his afflictions more than over his good fortune. Even if man should enjoy good fortune all his life, (this merely indicates that) the sins he committed are not being forgiven. What causes sins to be forgiven? Only suffering.