THE DEATH OF TZADIKIM ATONES
ויקרא פרק טז, א וַיְדַ בֵּ ר ה' אֶ ל-משֶ ה אַ חֲרֵּ י מֹות שְ נֵּי בְ נֵּי אַ הֲ רֹן בְ קָ רְ בָ תָ ם לִ פְ נֵּי-ה' וַיָמֻ תּו:
ירושלמי מסכת יומא דף ז/ב פרק א הלכה ה
למה הוא מזכיר מיתתן ביום הכפורים, ללמדך שכשם שיום הכפורים מכפר על ישראל כך מיתתן שך צדיקים מכפרת על ישראל
The Gemara does not explain the reason that the death of Tzadikim atones. Apparently this is understood according to the Medrosh of Pirkei d’Rabbi Eliezer regarding the death of Shaul, “and he buried the bones of Shaul…and after that G-d entreated for the land.” Since G-d saw that Dovid did a chesed (he wept and eulogized Shaul), immediately G-d was filled with mercy.
Thus, it is not the death of Tzadkim itself that atones, but the honor and mourning that is accorded to the Tzadik (which is really honoring HaShem) that leads to atonement.
LIVE BY THE MITZVOS
ויקרא פרק יח, ה ּושְ מַ רְ תֶ ם אֶ ת-חֻ קֹתַ י וְאֶ ת-מִ שְ פָ טַ י אֲשֶ ר יַעֲשֶ ה אֹתָ ם הָ אָ דָ ם וָחַ י בָ הֶ ם אֲנִי ה'
מסכת יומא דף פה/ב מניין לפקוח נפש שדוחה את השבת א"ר יהודה אמר שמואל אי הואי התם הוה אמינא דידי עדיפא מדידהו וחי בהם ולא שימות בהם
Rambam emphasizes that one may not tarry to violate Shabbos when needed to assist a sick person that is in danger. The verse says that we live due to the Mitzvos and not to die due to them. The Torah was given not to be vengeful, but given to bring mercy and peace to the world.
The Rambam’s expression of mercy (רחמים) is a little difficult. The Gemara (Berachos 33b) states regarding a bird’s nest that one that says the command shows how far His mercy reaches, should be quieted, since we do not ascribe mercy to the ways of HaShem, only that He decrees. Thus, it appears that it is not permitted to ascribe the reason of mercy to G-d’s mitzvos.
Perhaps the intention in that prohibition is a general matter that one should not ascribe the reasons for mitzvos are due to mercy. But one can describe the result of Torah is that mercy and peace are found in the world. And this is not the place to fully discuss this matter.
BEING LIKE A COHEN GADOL
ויקרא פרק יח, ה ּושְ מַ רְ תֶ ם אֶ ת-חֻ קֹתַ י וְאֶ ת-מִ שְ פָ טַ י אֲשֶ ר יַעֲשֶ ה אֹתָ ם הָ אָ דָ ם
מסכת בבא קמא דף לח/א ר"מ אומר מנין שאפילו נכרי ועוסק בתורה שהוא ככהן גדול ת"ל אשר יעשה אותם האדם וחי בהם כהנים ולוים וישראלים לא נאמר אלא אדם הא למדת שאפילו נכרי ועוסק בתורה הרי הוא ככהן גדול
The word אדם implies any category of person that is not an animal. One of the letters from Rambam states that the matter is not in doubt that anyone who engages oneself in proper conduct and belief in the Creator merits Olam HaBa. Therefore, even a non-Jew who engages in Torah, is compared to a Cohen Gadol. This concept by a non-Jew is limited to their learning of their seven Mitzvos, since according to the Gemara (Sanhedrin 59a) a non-Jew is not allowed to learn the rest of the Torah.