Then David said to Gad, "I am in great distress. Let us now fall into the hand of the LORD for His mercies are great, but do not let me fall into the hand of man." 2 Samuel 24:14 (NASB)
King David was a wise man. Even in times of trouble,even if you feel God is angry with you, the best place to be is in God's hands. That comes from having faith in, from being able to trust a just, perfect, merciful, gracious and loving God.
Pretty sure there is nothing more I can or want to say about that.