"The yetzer hara’s first argument is that your sin makes you worthless and it is as if you are completely irreligious. This is a dirty lie. First, Hashem loves you no matter how badly you have sinned. His love for each of His children is unconditional, as He taught us when He didn’t allow the angels to sing shira after the wicked Egyptians drowned (see Chapter 5). Hashem values you no matter what you have done. He still cherishes you just as much. He does not reject you or angrily demand revenge.
Of course, our actions matter a lot. Our sins have consequences, as most unintelligent decisions do. But these repercussions don’t come from real anger. Hashem still cares about us just as much. He only wants us not to sin because it is bad for us.
Further, you must remember that true greatness does not depend on how religious you look. It is not even determined by your actual level. The greatness of your deeds is determined by the effort you exerted and the difficulty the situation presented, due to its specific circumstances and your overall life-setting. No failure can take away from your toil.
You must not think badly of yourself because of your mistakes. Hashem realizes how hard your challenges are. He views everything fairly. He doesn’t fall for the yetzer hara’s distorted perspective. Hashem knows you are a good person who deep down wants to do what’s right, even if you are often overpowered by desire. He knows that you wish you had acted differently. Hashem sees the goodness within you and thinks so highly of you, even if you don’t. Hashem believes in you! He knows you can overpower the yetzer hara and regain control.
Could it be that the One Who created desire and gave us our challenges doesn’t know how hard they are? Of course not. Hashem knows how difficult each of our challenges is. He doesn’t look down on any person who struggles with his desires, no matter how badly the person has fallen.
Hashem is so proud of every bit of effort, even if we haven’t attained mastery. He takes pride in any person who puts in any effort not to go down without a fight, because He knows how difficult the battle is. Hashem values these accomplishments far more than achievements that seem huge but lack the same difficulty. He knows that we are accomplishing and becoming great people even if our actions don’t look the part of a great individual, because it is the effort that counts. And if He is proud of us, that means we are people to be proud of, no matter what we look like."
Source: The Battle of the Generation (
guardyoureyes.com/ebooks/item/the-battle-of-the-generation), Appendix A. Read there for more on this topic.