What is the task of Rosh Hashanah? How ought one conduct himself on Rosh Hashanah?

Taking a look at various source materials, one seems to see a contradiction. On one hand, we know that Rosh Hashanah is the Day of Judgment. The scales are poised. Each person is judged according to his deeds (or lack of them). The tzaddikim are signed and sealed immediately for a good life in the coming year. The bad guys are inscribed and sealed for an immediate demise in the coming year. Those who didn't tip the scales to either side, receive a suspended sentence - they have until Yom Kippur (or until Hoshana Rabba) to repair their ways.

Look also at some excerpts from the Rosh Hashanah prayers: "It is a frightful and awesome day. All of Creation and their deeds are brought for inspection before [G‑d]." In this lies one of the foundations of Jewish belief, that the Creator exacts punishment from the ones who defy his will and is beneficent to the ones who keep the mitzvot. (See the Rambam's 13 Principals of Faith #11)

The Jewish People…put on white festive garments...eat, drink and rejoice knowing that G‑d will make a miracle….

The Holy Ari said that with all this in mind, if a person doesn't manage to shed a few tears during these Days of Awe, it is a clear sign that his soul is lacking something.

On the other hand, we have the verses in Chapter 8 of the book of the prophet Nehemia. On Rosh Hashanah, the people gathered in Jerusalem, and Ezra the scribe read to them from the Torah and explained to them its meaning. When the people heard and realized that they had been so delinquent in their service, they began to weep and lament. Nehemia said to them , "…for today is Holy to your G‑d; do not mourn and do not weep…go home, eat good food and drink sweet wine, and send portions to those who did not prepare anything; today is holy to our G‑d, and the joy of G‑d is your strength." (Nehemia 9-10)

The Jerusalem Talmud, Tractate Rosh Hashanah (1:3), quoted this verse, "For what nation is there that is so great, that has such righteous statutes and judgments as all this Torah?" (Deut. 4:8) The Talmud then goes on to explain that most people, would they be involved in a court case where their life was on the line, would dress all in black and walk around sorrowfully. But the Jewish People, are not like that. They put on white festive garments, wash, cut their hair, eat, drink and rejoice knowing that G‑d will make a miracle for them."

From here we see that they remove all the worries of the impending judgment and instead throw their trust totally upon G‑d, confident of the impending verdict.

The Lecivitzer Rabbi used to explain: "…and the joy of G‑d is your strength", the joy of G‑d is that you put your total trust in Him. That is your strength.

It is further brought in the work Torat Avot from the Kobriner Rebbe that the month of Elul is the appropriate time for the repentance and self-rectification a person needs to do. When the month of Tishrei comes, the service is different. The service of Tishrei and Rosh Hashanah is to declare the sovereignty of G‑d over us, to re-crown Him as King and to nullify our will before His.

Now, with the above ideas, we can solve the apparent contradiction in the nature of the service of Rosh Hashanah.

On Rosh Hashanah the people were crying when they realized how deficient their Torah observance was. Nehemia said to them, "No! Crying doesn't help. The Divine Presence cannot dwell in a place where there is sorrow. One can only connect himself to G‑d through joy. Despair only drives away the Divine Presence. Therefore, "Do not weep…go home, eat good food and drink sweet wine". Then you will be joyful, and then you will be able to draw closer to the Creator. For this is the service of Rosh Hashanah, to draw oneself close to G‑d in connection.

If we are to go home to rejoice instead of weep, what did the Ari mean when he stated that one who doesn't shed a tear during the Days of Awe has something lacking in his soul? Where is there a place for weeping?

The Ari was not speaking about tears of sadness. He was referring rather to tears of longing and desire for closeness to G‑d. One who doesn't shed these tears is certainly suspect.

…it is difficult to turn around so easily, leaving the past behind.

Nevertheless, it is difficult to turn around so easily, leaving the past behind. Without joy to propel us forward, there is almost no chance of achieving any level of connection to the Divine.

This can be understood by a parable: A soldier was assigned a post, to guard a certain bridge over which the King of his country was to pass and to salute him as he passed. The soldier waited and waited for the King to come, but still he didn't appear. Since the King didn't yet show, he decided to take a quick dip in the waters of the river below. Suddenly, when he was in the water and completely naked, the entourage of the King arrived. The soldier was not at his post. He was in a dilemma. Given his current situation, should he hide from the King and not acknowledge his presence, or appear before Him to offer his salute even as he was, without any clothes on?

In an instant he decided. How could it be that his beloved King was right there and he would not greet him and honor him? Therefore, he stood up as he was before the King, at full attention, and gave his salute. The King, being wise and benevolent, immediately understood what had occurred. The soldier received a Medal of Honor for his self sacrifice in service of the King.

The meaning of the parable is clear. A Jew, when he must appear before G‑d may well be completely naked, without merits. Nevertheless, how could a Jew not come before his King? There is no choice but to acknowledge the holiness of the day, raise his voice in joyful prayer, and rely on the kindness and benevolence of the King, pleading for divine mercy despite his spiritual nakedness.