I was told by a Chabad rabbi that the determination of reaching Heaven or Hell (Gan Eden or Gehinnom) is done through the weighing of aveiros (sins) and mitzvos (good deeds). This was, of course, a quick response and I would like to know if this is basically true. And if so, where could I find the documentation for this? Also, would this apply to non-Jews as well?
It is taught: Beit Shammai says:
There will be three groups of people on the Day of Judgment: One of fully righteous people, one of fully wicked people, and one of average people. Fully righteous people will immediately be written and sealed for eternal life. Fully wicked people will immediately be written and sealed for Gehinom (Hell), as it is stated: “And many of those who sleep in the dust of the earth shall wake, some to eternal life and some to shame and everlasting contempt” (Daniel 12:2). Average people will descend to Gehinom (to be cleansed and to achieve atonement for their sins), and they will cry out in their pain and eventually ascend from there, as it is stated: “And I will bring the third part through the fire, and will refine them as silver is refined, and will try them as gold is tried; they shall call on My name, and I will answer them” (Zechariah 13:9). This is referring to the members of the third group, who require refinement and cleansing. And about them, Channah said: “The L-rd kills, and gives life; he brings down to the grave, and brings up” (I Samuel 2:6).
It was taught: Beit Hillel says: He who is “and abundant in kindness” (Exodus 34:6) tilts (the scales) in favor of kindness, (so that average people will not have to pass through Gehinom (Hell)).
The Gemara asks: How does He do this? Rabbi Eliezer says: He pushes down (on the side of the merits, tipping the scale in their favor), as it is stated: “He will again have compassion upon us; He will push down our iniquities” (Micah 7:19). Rabbi Yosei bar Ḥanina said: He bears, (raises), (the side of the sins), as it is stated: “He bears sin and forgives transgression” (Micah 7:18).
RASHI: Explains that G-d pushes down or raises up the pans of the scales containing merits or sins respectively, in favor of the one being judged.
- Excerpts from the Talmud Tractate Rosh HaShannah 17a
From here we see the source about how our deeds are weighed in judgment on the metaphorical "Scale".
"The wicked will be turned back to the Netherworld; (and) all the nations that forget G-d" (Psalms 9:18)
...Rabbi Yehoshua said to him: But is it stated in the verse that the sinners of the Jewish people will be like all of the gentiles? It is stated only: “All the gentiles that forget G-d.” Rather, the wicked shall be turned back to the netherworld, and who are they? They are all the gentiles that forget G-d. (Therefore, Gentiles who fear God do have a share in the World-to-Come.)
RASHI: G-d will pick out the evildoers among the Gentiles and put them in Gehinom (Hell). And they will not get a future reward; But the rest of the Gentiles, will receive a future reward.
- Excerpt Talmud Tractate Sanhedrin 105a
Once Antonius asked Rebbi: 'Shall I enter the world to come?' 'Yes!' said Rebbi. 'But,' said Antoninus, 'is it not written, (Ovadiah 1:18) "There will be no remnant to the house of Esau?" 'That,' Rebbi replied. 'applies only to those whose evil deeds are like to those of Esau.'
- Talmud Tractate Avodah Zarah 10b
RAMBAM : Laws of Teshuvah (Repentance)3:5 "...Similarly, the "pious of the nations of the world" have a portion in the world to come."
RAMBAM Laws of Kings and their Wars : 8:11
"Anyone who accepts upon himself the fulfillment of these seven mitzvot (commandments) and is precise in their observance is considered one of 'the pious among the gentiles' and will merit a share in the world to come."