"Thou tellest my wanderings: put thou my tears into thy bottle: are they not in thy book? When I cry unto thee, then shall mine enemies turn back: this I know; for God is for me."
Several things David here comforts himself with in the day of his distress and fear ~
"That God took particular notice of all his grievances and all his griefs, of all the inconveniences of his state: but this comforted him, that God kept a particular account of all his motions, and numbered all the weary steps he took, by night or by day. God takes cognizance of all the afflictions of his people; and he does not cast out from his care and love those whom men have cast out from their acquaintance and converse."
"Of all the impressions thus made upon his spirit. When he was wandering he was often weeping, and therefore prays, "Put thou my tears into thy bottle, to be preserved and looked upon; nay, I know they are in thy book, the book of thy remembrance." God has a bottle and a book for his people's tears, both those for their sins and those for their afflictions. This intimates,that he observes them with compassion and tender concern; he is afflicted in their afflictions, and knows their souls in adversity. As the blood of his saints, and their deaths, are precious in the sight of the Lord, so are their tears, not one of them shall fall to the ground. I have seen thy tears. That he will remember them and review them, as we do the accounts we have booked. God will not forget the sorrows of his people. The tears of God's persecuted people are bottled up and sealed among God's treasures....God will comfort his people according to the time wherein he has afflicted them, and give to those to reap in joy who sowed in tears. What was sown a tear will come up a pearl."
"...this I know, for God is for me, to plead my cause, to protect and deliver me; and, if God be for me, who can be against me so as to prevail?" The saints have God for them; they may know it; and to him they must cry when they are surrounded with enemies; and, if they do this in faith, they shall find a divine power exerted and engaged for them; their enemies shall be made to turn back, their spiritual enemies, against whom we fight best upon our knees."
~ Matthew Henry on Psalm 56