When a person makes a Mitzvah, it goes up to the Holy One Blessed be He and tells about the person who made her. Then the Holy One appoints the light of the Mitzvah to bring good to that person every day.
If a person conducts himself against the Torah laws, the actions he takes come up to the Holy One and get appointed to harm this person.
“וַיַּרְא יְהוָה וַיִּנְאָץ מִכַּעַס בָּנָיו וּבְנֹתָיו.”
“YHVH saw this, and spurned them Because of the provocation of His sons and daughters.”
The Zohar explains that ‘YHVH saw this’ means that God sees the transgressions of the people coming before him. He responds accordingly and releases the corrective energy onto the people.
King David repent on his sin with the wife of Uriah and the prophet Nathan gave him the message that his sin was ‘taken away’ and the punishment of death was abated.
2 Samuel 12:13
“וַיֹּאמֶר דָּוִד אֶל נָתָן חָטָאתִי לַיהוָה וַיֹּאמֶר נָתָן אֶל דָּוִד גַּם יְהוָה הֶעֱבִיר חַטָּאתְךָ לֹא תָמוּת.”
“Then David said to Nathan, “I have sinned against YHVH.” And Nathan said to David, “YHVH also has taken away your sin; you shall not die.”
The transgressions of the people create spiritual energy form and cannot be removed by ‘chemicals’ of this world because all our actions come before God.
“כִּי אִם תְּכַבְּסִי בַּנֶּתֶר וְתַרְבִּי לָךְ בֹּרִית נִכְתָּם עֲוֹנֵךְ לְפָנַי נְאֻם אֲדֹנָי יְהוִה.”
“Although you wash yourself with lye And use much soap, The stain of your iniquity is before Me,” declares YHVH your GOD.”
The negative energy created comes before God and if we don’t repent, do Teshuva, we get corrected.
When Moses asked God (Deuteronomy 9:27) “do not look at the stubbornness of this people or their wickedness or their sin” he was asking to cancel the negative energies created by the people.
Every action we do creates an energy form that rewards us or harm us. It’s the way God created the system of cause and effect. The Light of Mitzvah, positive actions, especially study the Torah/Zohar and following the precepts of the Torah reward us with Light that manifests in our lives when and where we needed it the most. For negative actions, there’s no escape except by following corrective actions to cancel the negative energy we created before it comes to affect us with its judgments. The simple formula to cleanse the negative energies around us is by ‘producing’ positive Light that is greater than the one of the transgression.
For that Light, we study, pray, give Tzedaka and not missing any opportunity that comes on our path to do good because when we want to clear our negativity, God ‘arranges’ opportunities for us to do that.
One important thing that many people fail in doing is regretting good deeds. Sometimes we do something good for others, and later we realize that that person was not worthy of it or he used our support for something negative. When we helped that person with a pure heart, we earn light of that action. If we regret it later, we lose that light. Some people gave money to organizations with good causes, but then they realized that the organization was corrupt. We should never regret our giving because the act of giving is what counted, not the outcome. As long as we do or give with pure heart and consciousness, we earn the proper merits.