5 “Them that sit in darkness, and in the shadow of death, fast bound in beggary and iron”. Whence this, but that you were attributing things to yourself? That you were not owning the grace of God? That you were rejecting the counsel of God concerning you? For see what He adds: “Because they rebelled against the words of the Lord through pride”, not knowing the righteousness of God, and wishing to establish their own, “and they were bitter against the counsel of the Most High.”
“And their heart was brought low in labour”. And now fight against lust; if God cease to aid you may strive, you can not conquer. And when you shall be pressed by your evil, your heart will be brought low in labour, so that now with humbled heart you may learn to cry out, “O wretched man that I am! Who shall deliver me from the body of this death?”...Freed, you will confess the mercies of the Lord. “And they cried unto the Lord when they were troubled, and He delivered them out of their distresses”.
They were freed from the second temptation. There remains that of weariness and loathing. But first see what He did for them when freed. “And He led them out of darkness and the shadow of death, and broke their bonds asunder”. “Let them confess to the Lord His mercies, and His wonders to the children of men”. Wherefore? What difficulties has He overcome? “Because He broke the gates of brass, and snapped the bars of iron”. “He took them up from the way of their iniquity, for because of their unrighteousnesses they were brought low”.
Because they gave honour to themselves, not to God, because they were establishing their own righteousness, not knowing the righteousness of God, they were brought low. They found that they were helpless without His aid, who were presuming on their own strength alone.
Source: The Enarrations, or Expositions, on the Psalms (New Advent)