Our Lord rules the earth according to definite and righteous principles. They are: 1) He blesses those who love Him and care for others, and 2) He curses those whose hearts are hard toward God and man.
David loves, admires and worships a God like that. In fact he absolutely delights in Him. The result is that he wants to be like Him - he too wants to "consider the poor." A further result is that God also blesses David. So David was called "a man after God's own heart." As David himself puts it - "The Lord will deliver (such a man) him in time of trouble. The Lord will preserve him and keep him alive, and he will be blessed on earth; You will not deliver him to the will of his enemies." God delights in the man who delights in Him.
Because David loves such a God, he therefore loves the people of that God as well, so of course he wants them to know Him and rejoice in Him. So he has them repeat in song the words of this psalm as they begin their day, with the hope that, when they leave the temple, their lives, too, will be characterized by love to God and service to His people that day.
With that in mind, David sings of prayer and answered prayer - a loving relationship that God sustains to those who love him and who love and serve His people. The particular prayer that David was thinking of was prayed in an especially perilous situation, the situation of his own sickness. He describes it when he says, "I said, 'Lord, be merciful to me; heal my soul, for I have sinned against You.'" He tells of his enemies' hatred and of their hope that he will never rise again from his sickbed - even though they had been his "own familiar friends in whom I trusted."
But David particularly wanted to remind the people that the Lord did answer his prayer and help him. So he sings, "By this I know that You are well pleased with me, because my enemy does not triumph over me. As for me, You uphold me in my integrity, and set me before Your Face forever!" David would not have realized how much the Lord loved him if it had not been for just such a perilous time - the Lord used the trial to open David's eyes to that love. He does the same for us. He often opens our own eyes to His love by means of the trouble we experience.
Next, after describing how God blessed him and answered his prayer, he finally and simply leads the people in praise to the God Who deals in such a merciful way with His people. He sings,"Blessed be the Lord God of Israel from everlasting to everlasting! Amen and Amen."
How's your own relationship to God? Does it affect your relationship to other people? Do you love them because you love Him? Do you "consider the poor (poor in this world's goods, poor in spirit, poor by lack of friends)?" Do you therefore feel free to call on the Lord in all your own trials? Not that you've earned His favor by your "goodness" - but He's glorified by the work of His own Spirit within you - and you'll experience how much He loves you! It's a happy relationship with God, a relationship you evidence by loving God and caring for His people. If this is your case, then bless your graciously loving God today!