I can identify with how David felt. I was trapped in a pit of my own making. However, a pit can be from distress, grief, a spiritual trap, addictions, or a term for the grave.
Patience is hard to have sometimes, but the Lord will act in his time. I know he hears me, but he will act in his time, not mine.
Bible commentaries believe that David was also speaking from a spirit of prophecy about Christ. Verse 2 applies to Christ on the cross