David said he "waited patiently" for God to act- and sometimes that's hard for us to do. But in time God did answer, and God lifted him out of the depths and put his feet on a rock- a picture of what happens when we give our lives to Jesus Christ. He alone is the solid, unshakeable rock on which to build our lives.
If you are in a "pit" right now, don't give up. Instead, turn to Christ and find in Him the solid foundation you need.
" I waited patiently for the LORD; And He inclined to me, And heard my cry.
He also brought me up out of a horrible pit, Out of the miry clay, And set my feet upon a rock, And established my steps." Psalm 40:1-2 (NKJV)