After David was convicted of guilt in the matter of his adultery with Bathsheeba and the following cover-up, he felt a profound separation from God.  Psalm 51 was David’s cry to God for restoration!  Restore us Lord!  We want to sing of the joy of our salvation!
 When reflecting on David’s words in Psalm 51, I am reminded that it is important for me to take care of myself (mind my own business) AND also look to the best interests of others. When I do this, I am preparing to dwell with the Lord. Safety is there. Love is there. Peace is there.
If David had been thinking of Bathsheeba’s best interest (this story begins in 2 Samuel 11), the cycle of misery that followed perhaps could have been averted.  In spite of the drama, God allowed David to build up supplies for a temple of God, which his son Solomon (of Bathsheeba) would later build!