King David had some very high peaks in his life, taking out the giant Goliath in the Old Testament UFC main event being one of them. But David also had some very low moments.
David committed adultery with a woman named Bathsheba. This woman was the wife of one of David's mighty fight men, Uriah the Hittite. David should have been out with his army, in battle, but instead was relaxing back that the palace...enjoying his financial independence, his lofty position. With all the free time in the world he decides to sight see...and whoo, whoo, what a sight he sees. Beautiful Bathsheba is bathing in a place where David can check her out...and check her out he does.
David sends for the wife of another...and she comes...and the adultery takes place...and some added fruit for good measure...Bathsheba discovers she is pregnant.
David does some quick calculations and realizes that Uriah is going to figure out that he couldn't get his wife pregnant while he was on the battle field and she was at home...so...he calls him home to find out how the battle was going [the real agenda was a cover up].
While at home David keeps trying to get Uriah in the sack with his wife...so the child in her womb can be proclaimed to his...but Uriah is too honorable...he refuses to sleep with his wife while the armies of Israel are at battle...oh...if only the King had such honor.
After repeated attempts to get Uriah and his wife together, and Uriah's repeated refusal...David adds murder to his "To do" list...and sends Uriah back to battle with a note to the General...the note is Uriah's own death sentence.
Uriah is sent to the most fierce battle front where he dies. Back home, David takes Uriah to be his own wife and no-one is the wiser...
...But God sees...and is NOT happy.
God sends Nathan the prophet to tell David that his sin is known...forgiven...but the consequences of it will trouble him throughout all his temporal life.
Here is only a part of David's repentance and confession before God [Ps 51]
Create in me a clean heart, O God, and renew a steadfast spirit within me.
Do not cast me away from Your presence, and do not take Your Holy Spirit from me.
Far too often we use God/Jesus as the means to the end. Jesus is the means so that we do not have to go to hell but instead get to go to heaven.
But in David's eyes...God/Jesus is the end in itself. He realizes that it is God Himself who is the source of all joy, fulfillment, goodness...truth.
Heaven without Jesus would be hell. When David's eyes were opened by the Lord he realized that the greatest treasure ever was God Himself.