Psalms 104.15 in the Babylonian Talmud
תניא רבי יהודה בן בתירא אומר בזמן שבית המקדש קיים אין שמחה אלא בבשר שנאמר וזבחת שלמים ואכלת שם ושמחת לפני ה׳ אלהיך ועכשיו שאין בית המקדש קיים אין שמחה אלא ביין שנאמר ויין ישמח לבב אנוש

It was taught: Rabbi Yehudah ben Beteira says: "When the Temple is standing, rejoicing is only through meat, as it is stated: 'And you shall sacrifice peace-offerings and you shall eat there and you shall rejoice before the Lord your God' (Deuteronomy 27:7). And now that the Temple is not standing, rejoicing is only with wine, as it is stated: 'And wine that gladdens the heart of man' (Psalms 104:15).

תָּנֵי תַּנָּא קַמֵּיהּ דְּרַבִּי יוֹחָנָן: כׇּל מִינֵי מַשְׁקִין יָפִין לַחֲלוֹם חוּץ מִן הַיַּיִן, יֵשׁ שׁוֹתֵהוּ וְטוֹב לוֹ, וְיֵשׁ שׁוֹתֵהוּ וְרַע לוֹ. יֵשׁ שׁוֹתֵהוּ וְטוֹב לוֹ — שֶׁנֶּאֱמַר: ״וְיַיִן יְשַׂמַּח לְבַב אֱנוֹשׁ״, וְיֵשׁ שׁוֹתֵהוּ וְרַע לוֹ — שֶׁנֶּאֱמַר: ״תְּנוּ שֵׁכָר לְאוֹבֵד וְיַיִן לְמָרֵי נָפֶשׁ״.
The tanna who recited mishnayot before Rabbi Yoḥanan taught: One who sees any kind of drink in a dream it is a good omen, except for wine, as there is one who drinks it in a dream and it is a good omen for him, and there is one who drinks it in a dream and it is a bad omen for him. The Gemara elaborates: There is one who drinks wine and it is a good omen for him, as it is stated: “And wine that makes glad the heart of man” (Psalms 104:15), and there is one who drinks it in a dream and it is a bad omen for him, as it is stated: “Give strong drink unto him that is ready to perish and wine unto the bitter in soul” (Proverbs 31:6).

רבא רמי כתיב (תהלים קד, לא) ישמח וקרינן ישמח זכה משמחו לא זכה משממהו

והיינו דאמר רבא חמרא וריחני פקחין

Rava raises a similar contradiction: It is written: “And wine that gladdens the heart of man” (Psalms 104:15). The word for gladdens could be read as yeshamaḥ, meaning that wine makes one crazy, but we read it as yesamaḥ, gladdens the heart. The matter can be explained as follows: If one merits and drinks a moderate amount the wine gladdens him [mesameḥo], whereas if he does not merit and drinks excessively it makes him crazy [meshamemehu].

And that is what Rava meant when he said: Wine and fragrant spices have made me wise; that is to say, the controlled drinking of wine is beneficial to the drinker.

רב כהנא רמי כתיב תירש וקרינן תירוש זכה נעשה ראש לא זכה נעשה רש (והיינו דרבא דרבא) רמי כתיב ישמח וקרינן ישמח זכה משמחו לא זכה משממו

והיינו דאמר רבא חמרא וריחני פקחין

Rav Kahana raised a contradiction: It is written as tirash but we read it tirosh. This should be understood as follows: If one merits and drinks appropriately, he is made a head [rosh]; if one does not merit and does not drink appropriately, he is made poor [rash]. The Gemara comments: This is the same as what Rava said, as Rava raised a contradiction: It is written: “And wine that makes glad [yishamaḥ] the heart of man” (Psalms 104:15) with a shin, but we read it yisamaḥ with a sin. This teaches: If one merits, wine makes him happy [same’aḥ]; if one does not merit, it makes him confounded [shamem].

This is the same as what Rava said: Wine and good scents make me wise, meaning that wine benefits one who deserves it.

וּמִי סָעֵיד כְּלָל?! וְהָכְתִיב: ״וְיַיִן יְשַׂמַּח לְבַב אֱנוֹשׁ וְלֶחֶם לְבַב אֱנוֹשׁ יִסְעָד וְגוֹ׳״ — נַהֲמָא הוּא דְּסָעֵיד חַמְרָא לָא סָעֵיד!

אֶלָּא, חַמְרָא אִית בֵּיהּ תַּרְתֵּי: סָעֵיד וּמְשַׂמַּח. נַהֲמָא מִסְעָד סָעֵיד, שַׂמּוֹחֵי לָא מְשַׂמַּח.

Again, the Gemara asks: Does wine satisfy at all? Isn’t it written: “Wine gladdens the heart of man, making the face brighter than oil, and bread fills man’s heart” (Psalms 104:15); bread is that which satisfies, wine does not satisfy.

Rather, this verse is not a proof; wine has two advantages, it satisfies and gladdens. Bread, however, satisfies but does not gladden.

לליבא בחמרא וסימנך (תהלים קד, טו) ויין ישמח לבב אנוש

This remedy is beneficial for several ailments, and the Gemara presents each of these in turn: For curing the heart, the above combination should be taken with wine, and your mnemonic for this is the verse: “And wine that makes glad the heart of man” (Psalms 104:15).