What we do can be good, bad, or indifferent. We are conscious that some of the things we do are bad. They are not just in our consciousnesses, they are in our consciences. Some of us are not greatly concerned about those things that give us a bad conscience. Others are, and it is those for whom Jesus came. "I came not for the healthy, but for the sick." Healthy people should stop reading now.
Now if we have done something wrong, there may be nothing we can do about it. Even if there is, we may still feel shame that we did that wrong thing. But we have a solution, because Jesus died so that we can be accounted with his own righteousness. And, because he was 'God, with us', and perfect, we can also be accounted perfect. That's an amazing thing in itself, to be accounted with the perfection of God. But the consequence is that God cannot reject his own righteousness. If we are 'in Christ', we are beyond any accusation, spiritually speaking. Of course the consequence of successful accusation, with which our own consciences will agree, is the hell of which Jesus himself spoke so powerfully. He said that it is better to gouge out an offending eye than go to hell with it. Nobody spoke of hell like Jesus did, before, and probably after him. Why? Because he knew how terrible sin is, and he hated it.
How do we acquire this righteousness of God himself? Simply by believing that we have it. Of course, if we act in a reasonable manner, we will be grateful for salvation from hell, and will do loving things for him, and for everyone, out of that gratitude. We will share Jesus' attitude to sin, and hate it, also. We will hate sin in others, but not nearly as much as we hate it in ourselves. So we will become sanctified, seeing ourselves 'grow in Christ', possessing his qualities 'in increasing measure'.
What we cannot do, sensibly at any rate, is imagine that what we do earns us our salvation. What we do out of love for Jesus is only our duty to others. If we give all we have to the poor, it will not salve our consciences from even one wicked act that we have done. We must rest in the Christian sabbath, the rest of knowing that we need not work for our righteousness, and could not do so anyway.
And yet, people are told that they can work in order to be justified, by good deeds of charity, by religious acts of different sorts; but not one of them, however virtuous and even biblical they may seem, is effectual. Just as soon as we suppose that the righteousness of Christ is insufficient, and needs 'topping up', we blaspheme, and stand in danger of hell fire. 'Let us keep our eyes fixed on Jesus, on whom our faith depends from beginning to end.' Heb 12:2 GNB