While Rosh Ha-shana is a yom teru’a and a day of judgment, it is also a sacred occasion, which we are commanded to sanctify though food and drink and honor with nice clothes (Sifra, Emor 12:4; Peninei Halakha: Festivals 1:7). Half the day should be devoted to God, as on Shabbat and holidays. However, since the prayer services are very long on Rosh Ha-shana, they reduce the time available to study Torah, though it is important that prayer and study together amount to at least nine hours (as explained in Peninei Halakha: Festivals 1:5-6).
Based on textual similarities in the Torah’s description of the various holidays, the Gemara concludes that the holidays share several features (Shevu’ot 10a), and just as there is a mitzva to rejoice on the three pilgrimage festivals, so too, there is a mitzva to rejoice on Rosh Ha-shana by eating meat and drinking wine. It, too, is therefore called a “festival,” as we read: “Blow the shofar on the new moon, the covered moon for our festival day” (Tehilim 81:4).
However, since it is also a day of teru’a and judgment, the level of happiness is not the same as on the rest of the festivals. This is why in the Amida we do not add the phrase “festivals for rejoicing, holy days and seasons for joy” as for other festivals (SA 582:8), nor do we recite Hallel. The angels asked God about this: “‘Why don’t the Jews sing [Hallel] before You on Rosh Ha-shana and Yom Kippur?’ He replied: ‘Is it conceivable that the King is sitting on the throne of judgment with the books of the living and the dead opened before Him, yet the Jews burst into song?’” (Rosh Ha-shana 32b; Arakhin 10b; SA 584:1; see Peninei Halakha: Festivals 2:7).
Therefore, there is a mitzva to serve two festive meals, one at night and one during the day, and joyfully consume meat and wine. However, Rishonim write that a person should not eat to satiety on Rosh Ha-Shana, so that he does not come to act frivolously. Rather, he should stand in awe of God (SA 597:1). We see that the meals on Rosh Ha-shana should be better and more joyful than those of Shabbat, but not as lavish as those of the pilgrimage festivals.
Similarly, there is a mitzva to wear nice clothes and to wash them before the holiday. However, we do not wear our nicest clothes as we do on the other festivals, because of the fear of judgment. Some have a custom to wear white on Rosh Ha-shana (SA 581:4; MB ad loc. 25). One whose hair is too long and looks disheveled must get a haircut in honor of Rosh Ha-shana. One who is normally clean-shaven must shave before Rosh Ha-shana (SA 581:4).
The dual nature of Rosh Ha-shana can be learned from Ezra the Scribe, who, in addition to encouraging the people to repent, instructed them to rejoice on Rosh Ha-shana, as it is a day consecrated to God. Early in the time of the Second Temple, when the Jewish community in Eretz Yisrael was becoming established after returning from the Babylonian exile, many of the simple people did not observe mitzvot properly. On Rosh Ha-shana, Neḥemia the political leader and Ezra the spiritual leader gathered the nation together, men and women, to inspire them to repent. Ezra read from the Torah, starting in the morning and continuing until midday, explaining the Torah and mitzvot to them. When the listeners understood that they had sinned, they were inspired to repent, and they began to mourn and cry. Ezra and Neḥemia emphasized that it was a day to rejoice in addition to repenting:
“This day is holy to the Lord your God; you must not mourn or weep,” for all the people were weeping as they listened to the words of the Torah…. “Go, eat choice foods and drink sweet drinks and send portions to whoever has nothing prepared, for the day is holy to our Lord. Do not be sad, for your rejoicing in the Lord is the source of your strength.” The Levites stilled the people, saying, “Hush, for the day is holy; do not be sad.” (Neḥemia 8:9-11)
Ezra and Neḥemia instructed the people to eat delicacies and drink sweet drinks in fulfillment of the mitzva of eating meat and drinking wine. Additionally, this would serve as a good omen for abundance and sweetness for the entire year (Rosh, Rosh Ha-shana 4:14). “Then all the people went to eat and drink and send portions and make great merriment, for they understood the things they were told” (Neḥemia 8:12). They understood that God was not interested in punishing them, but rather was happy with their repentance.
Nevertheless, in the times of the Ge’onim and Rishonim there were pious and wise people who fasted on Rosh Ha-shana. It stands to reason that given the tribulations of exile, they felt the need to identify with the pain of the Shekhina. How could they joyfully eat on the day of judgment while the Shekhina was in exile? They wished to facilitate a more profound repentance by indulging in certain ascetic practices in the hopes of neutralizing evil. In practice, though, the accepted halakha is that even during the bitter days of exile, there is a mitzva to have festive meals on Rosh Ha-shana, and it is certainly forbidden to fast.
In contrast, others maintain that since Rosh Ha-shana is not a pilgrimage festival and no shalmei simḥa are offered on it, there is no specific mitzva to be happy then. However, since it is a sacred occasion, when it comes to honor (kavod) and pleasure (oneg) it is similar to Shabbat. This is the opinion of Maḥzor Vitri §322; Yam Shel Shlomo, Beitza 2:4; SAH 529:5-6. They base themselves on the fact that in the Rosh Ha-shana Amida, we do not say “festivals for rejoicing, holy days and seasons for joy.” (True, there are some Ge’onim who say that we do recite “festivals for rejoicing” in the Amida, but they are not followed in practice, as pointed out by R. Hai Gaon; Rambam; Rosh, end of Rosh Ha-shana; and SA 582:8.)
Rambam writes (MT, Laws of Yom Tov 6:17) that there is a mitzva to rejoice on all the festivals, including Rosh Ha-shana. However, elsewhere he writes that the joy of Rosh Ha-shana is not as intense (MT, Laws of Ḥanuka 3:6). Similarly, Sefer Ha-aguda states that people should eat and drink and rejoice, but should not eat to satiety, so that they will feel lacking and thus stand in awe of God. This is also the position of Shulḥan Arukh (597:1) and many Aḥaronim. We see that there is an obligation to drink wine and eat meat on Rosh Ha-shana, but not in as great quantities as on other festivals. If, however, one prays with the proper awe, and afterward wishes to fulfill the mitzva of joy to the utmost and to eat and drink in quantity as on other festivals, it would seem that he may do so, since many Rishonim and Aḥaronim permit this, in accordance with Ezra’s instruction to rejoice greatly.
Some Ge’onim maintained that it is a mitzva to fast on Rosh Ha-shana (Otzar Ha-Ge’onim, Beitza 4b), and some Rishonim did so, as recorded in Or Zaru’a 2:257. It is reasonable to assume that they agreed that there is a mitzva to rejoice on Rosh Ha-shana, and that they did so at night. Nevertheless, they felt that it was proper to fast during the Ten Days of Repentance because of the anguish of the Jews in exile. They felt that this would be permissible even on Shabbat and Rosh Ha-shana, just as it is permissible to fast on Shabbat or festivals following a bad dream. Many other Ge’onim, including R. Sa’adia and R. Hai, forbade fasting, and Shulḥan Arukh cites their view (597:1). There is an opinion that someone who fasted once on Rosh Ha-shana is obligated to continue this custom for the rest of his life, even if he fasted only because of a bad dream. If he chooses to eat, he endangers his life (Sefer Ha-agur). Shulhan Arukh cites this as well (597:2-3), although Kol Bo and R. Yitzhak Tyrnau in his Sefer Ha-minhagim say that one does not have to take this into account. Rema writes that someone who is not worried about this may eat on Rosh Ha-shana in subsequent years, as long as he does hatarat nedarim. This is the position of MB ad loc. 9 and the general custom.