"I had fainted, unless I had believed to see the goodness of the LORD in the land of the living."
David did not see God's goodness.
He only – by faith – believed that he would see it. This belief is what kept him from fainting.
Our encouragement comes not so much from seeing God answer our prayer, but rather from our believing that He will.