In this psalm, David is not praying to the Lord. Instead, he is doing what all Christians should regularly do: David is preaching the Gospel to himself. David is not listening to his feelings and following his heart. David is recounting the promises of the Gospel and preaching to his soul. Rather than succumbing to his feelings of discouragement, David contends with these feelings. David rightly recognizes that in moments of discouragement, the goodness of God is often forgotten. Therefore, he begins to compile a list of all the benefits of the covenantal mercy of God, lest any of them should be forgotten.