"Filthy rags"--that verse you are quoting, I do not think it means what you think it means. People often refer to this phrase from Isaiah 64:6, "and all our righteousnesses are like filthy rags" (NKJV). It seems to be used to mean that nothing we can ever do is actually good; even our best attempts at righteousness are worthless. But is that what the verse actually says? I don't think so.
Backing up a chapter to get the context, we are told that God had redeemed Israel and made them his special people (63:7-9). The next verse says: "But they rebelled and grieved his Holy Spirit; therefore he turned to be their enemy, and himself fought against them" (63:10, ESV). This begins a section that is a cry to God for mercy. Isaiah speaks on behalf of the people, confessing their sinfulness: "We have become like those over whom you have never ruled, like those who are not called by your name" (63:19, ESV).
This theme carries over into chapter 64, where Isaiah continues to describe how the people had turned away from God, including the phrase in question:
"We have all become like one who is unclean, and all our righteous deeds are like a polluted garment. We all fade like a leaf, and our iniquities, like the wind, take us away. There is no one who calls upon your name, who rouses himself to take hold of you; for you have hidden your face from us, and have made us melt in the hand of our iniquities." (64:6-7, ESV)
This is not the humble self-assessment of a righteous person seeking God. This is the humble confession on behalf of a people who were not seeking God.
It is true, of course, that we should not glory in our own deeds. As Jesus says, "So you also, when you have done all that you were commanded, say, ‘We are unworthy servants; we have only done what was our duty.’” (Luke 17:10, ESV). However, the Bible is clear that when we do humbly submit to God, he is pleased with our obedience. Contrast the filthy rags concept with this vision of the Church:
"'Let us rejoice and exult and give him the glory, for the marriage of the Lamb has come, and his Bride has made herself ready; 8 it was granted her to clothe herself with fine linen, bright and pure'—for the fine linen is the righteous deeds of the saints." (Rev. 19:7-8, ESV).
Clearly, the Bride's garments can only be white because they have been washed in the blood of the Lamb (Eph. 5:26-27). But when God sees righteous deeds of the Bride, he doesn't see filthy rags, he sees fine linen.