As we open to 2 Samuel, David is no longer on the run, Saul is dead, and the kingdom is being given to David. The real test of David's life is not what he does when he is afraid, insecure, and depressed, the real test comes as he is exalted, rewarded, and given the highest honor of any person in his day: David is crowned King of the people of God, King of Israel.
Will David still pursue God? In 2 Samuel 5, see the crowning of David as King and then note the unbroken pursuit of the Lord in David's life.
2 Samuel 5:1-25