Those who are so proud of their own success and their own righteousness that they thank God they are “not like other men” (Luke 18:11) tend to look down on others and have no mercy, no compassion, no sympathy. But in God’s sight, such self-righteous pride is one of the worst sins of all (Isaiah 64:6).
Some people have to go through a lot before they get humbled, like King David. David probably had a lot of pride and needed to be humbled before God could use him to lead His people, because look at the great things he did before that. As a boy he fought and killed a lion and a bear to protect his father’s sheep, and then he killed Goliath, the giant champion of the attacking Philistines, and all Israel hailed him as a great hero (1 Samuel 17:34-37,49; 18:6-7). Apparently David then became proud, lost his fear of God, and committed some awful sins. Worst of all, he became a self-righteous sinner because he covered it up and pretended to be righteous. Finally the judgments of God fell and he lost everything (2 Samuel 11-12). But a marvelous change occurred in him after God humbled him.
We haven’t got anybody’s righteousness except Jesus’, and He’s the only One who can give it to us (Philippians 3:9).
1 John 2:29 ESV - If you know that he is righteous, you may be sure that everyone who practices righteousness has been born of him.
Psalm 106:3 ESV - Blessed are they who observe justice, who do righteousness at all times!
Philippians 1:11 ESV - Filled with the fruit of righteousness that comes through Jesus Christ, to the glory and praise of God.