I Samuel 30:1-5
And it came to pass, when David and his men were come to Ziklag on the third day, that the Amalekites had invaded the south, and Ziklag, and smitten Ziklag, and burned it with fire;  And had taken the women captives, that were therein: they slew not any, either great or small, but carried them away, and went on their way.  So David and his men came to the city, and, behold, it was burned with fire; and their wives, and their sons, and their daughters, were taken captives. Then David and the people that were with him lifted up their voice and wept, until they had no more power to weep.  And David's two wives were taken captives, Ahinoam the Jezreelitess, and Abigail the wife of Nabal the Carmelite.  And David was greatly distressed; for the people spake of stoning him, because the soul of all the people was grieved, every man for his sons and for his daughters: but David encouraged himself in the LORD his God.
The Amalekites came and burnt the city, taking all the woman and children, even David’s family. The people were so angry with David they wanted to stone him. Hour by hour just got worst for David, his city was burnt, his family was missing, his people wanted to kill him.
Wait a minute what did David do? Did he run and hide? Did he give up? No!! He encouraged himself in the Lord. The Bible says he was distressed, of course he was upset by what happened but he never gave up. He encouraged himself in the Lord his God. David knew that God had the answers.
David prayed to God to ask what he should do. Verse eight says, “And David enquired at the LORD, saying, Shall I pursue after this troop? shall I overtake them? And he answered him, Pursue: for thou shalt surely overtake them, and without fail recover all.”
When everything seems to go wrong encourage yourself in the Lord. God is always there. David’s entire family was gone but he knew God had the answers. Trust God, He knows the “rest of the story”.
Have a great day.