I love how the Bible says, "...David encouraged himself in the LORD his God." He didn't try to figure out the problem on his own, he didn't lean on his own feelings or wisdom, he didn't even turn to a friend for encouragement. David took his problem straight to God, and found peace in Him. And I think it is significant that he sought counsel from God first before he did anything else. He didn't make his own plans, and then expect God to approve his plans. He asked God for direction, and God gave him confirmation of what to do. Then, David simply believed God had already given him the victory over Amalek, and he went on to defeat them and recover his family and the families of his men.
photo from www.freepixels.com