how to...
hmm let's see, who is thanking God for mercy, praising Him for His goodness?
and who is thinking about themselves and about others, how 'good' they are or much they don't measure up?
does either one forget the law? i don't think so - but one forgets that the law isn't salvation.
Those last three words that you have said is the issue, because nobody is saying the law is salvation.
This is the long tired false accusation hyper-grace crowd uses on those who emphasize on the teachings of the bible that show how a believer can and can not walk in the faith.
Half of all of Apostle Paul's epistles are dedicated to discerning believers from unbelievers and false teachers by how they walk in the faith. He spends at least 2 or more chapters in each one on stating how one can and can not walk in the faith, and by how one walks shows if they abide in Christ for salvation.
We do not teach works to get/earn salvation nor to maintain it, but we do teach that it is the proof of a true saving faith in the Lord. If one does not continue in that faith and is moved away from that hope of salvation in the gospel as
Colossians 1:22-23 says is only how we are reconciled to God.
It is not our own works we are boasting about when we speak on works, but this is what we are boasting on:
(Colossians 1:29) Where unto I also labor, striving according to His working, which worketh in me mightily.