Psalm 73
73 Verily, how good is God to Israel,
with the pure of heart!
2 I was about to fall,
and little was left for me to slip.
3 I was envious of the arrogant,
seeing the prosperity of those wicked ...
(NIV)
David the psalmist wonderfully experienced God's mercy and greatness on this earth and in his life and constantly declared the goodness of God as a praise, he came to recognize that there was a great difference between the wicked and those who trusted God and were pure of heart.
David came to feel envy for the arrogant seeing that they also prospered and declares that because of this he almost turned away from God, he recognized that his feet almost slipped and his steps almost slipped because David also felt anguish and bitterness sometimes prevents him from the mind thinks clearly and leads to hasty generalizations that are not completely accurate, such as the one shown here.
Although David had doubts in his heart because of the bad and his "prosperity" he could recognize that only by approaching God and seeking him could he understand the good. In the same way, God expects us to seek him out, to put our hope in him and count all his works since the tragedy of the wicked has its effects and those who trust in God will have their divine reward and blessings.