The writer of Psalms 119 was writing as a saved man, (a born again Christian). The writer didn't just wake up one day and choose to put his faith in the LORD to save him from his sin. No, the writer was born dean in his sin, just as the rest of mankind is.
Psalms 119:29-30 still shows us the one and only way of salvation by grace through faith.
God had to quicken him to life out of his state of death, and then God had to give the man the gift of faith in the LORD, then the LORD had to give him the gift of repentance, then He had to give him the gift of a new heart and then He had to give him the gift of His ongoing life long work of sanctification and transformation.
A gift can be the experience of doing something, such as giving someone the opportunity to experience driving a Ferrari for an hour where the gift intrinsically requires them to do the work of driving it in order to have that experience, but where doing that work contributes nothing towards earning the opportunity to drive it.
Similarly, God's gift of eternal life is the experience of knowing Him and Jesus (John 17:3), and God's law is His gift to teach us how to have that experience, not instructions for how to contribute anything towards earning it. In Exodus 33:13, Moses wanted God to be gracious to him by teaching him to walk in His way that he and Israel might know Him, and in Matthew 7:23. Jesus said that he would tell those who are workers of lawlessness to depart from him because he never knew them, so the goal of the law is to teach us how to know God and Jesus, which is His gift of eternal life. In Luke 10:25-28, Jesus affirmed that the way to inherit the gift of eternal life is by obeying the greatest two commandments.
So, according to Gods Word, you contributed nothing but a stinking dead corpse and filthy rags, to the work of salvation.
You are now deliberately taking Isaiah 64:6 out of context. Again, it was not God speaking about how He views our works in obedience to Him.
The man made "works gospel" is an insult to the LORD, as it robs Him of His glory. Those who claim that salvation is a joint effort between God and man, do so because of their pride. They boast about their contribution towards their salvation.
In Matthew 4:15-23, Jesus began his ministry with the Gospel message to repent for the Kingdom of God is at hand, which was a light to the Gentiles, and God's law was how his audience knew what sin is (Romans 3:20), so repenting from our disobedience to it is a central part of Gospel and has nothing to do with insulting the Lord or robbing Him of His glory. Moreover, in Titus 2:11-13, our salvation is described as being trained by grace to do what is godly, righteous, and good, and to renounce doing what is ungodly, so doing those works has absolutely nothing to do with trying to contribute anything towards earning our salvation as the result, but rather God graciously teaching us to be a doer of those works is part of His gift of salvation. Again with Titus 2:14, becoming zealous for doing good works in obedience to God's law is the way to believe in what Jesus spent his ministry teaching by word and by example and in what he accomplished through the cross, not the way to insult him and rob him of His glory. In Matthew 5:16, Jesus encouraged us to do good works because they give glory to God.
We are not capable of doing any good work, because we are not good. Only God is good, that's why our best works are as filthy rags in His sight. God can see our motives, He sees our heart and He knows our reason for doing good works is a selfish reason. We do it to glorify ourselves, and to get something from God. So our motive is evil, and that's why they stink.
In 2 Timothy 3:16-17, Paul said that OT Scripture is profitable for teaching, correction, reproof, and trading in righteousness that the man of God might be complete, thoroughly equipped to do every good work.
"Good" is the ultimate goal at which all things aim. For example, a "square" is plane figure with four equal straight sides and four right angles, so something is a good square to the extent that is aimed at that goal. To say that God is good is not just to say that He is a doer of good works, but that He is the ultimate goal at which things aim, that all good works bring glory to Him by embodying His goodness, and that someone is a good person to the extent that they are aimed at embodying His likeness through being a doer of His character traits.
Faith is a gift, that God gives to His children. Many Christians think they produced it within themselves and that gives them case to boast. So their faith is their idol, they idolize their faith because that's what saved them, not Christ.
It is salvation by grace through faith that is the gift. We embody what we believe to be true about God through our works, or in other words, the way to believe in God is by being in His likeness through being a doer of His character traits. For example, by being a doer of good works in obedience to God's law we are embodying His goodness, which is why our good works bring glory to Him, and by embodying God's goodness we are also expressing the belief that God is good. Likewise, the way to believe that God is a doer of justice is by being a doer of justice in obedience to His law, the way to believe that God is holy is by being a doer of His law for how to be holy as He is holy, and so forth. The reason why God is graciously teaching us to be a doer of His law is not so that we will have something to boast in ourselves about. Christ saving us from not being a doer of God's law by graciously teaching us to be a doer of it is the way that he is giving us his gift of salvation, not us trying to save ourselves apart from him.