Psalm 51:17 My sacrifice, O God, is a broken spirit; a broken and contrite heart you, God, will not despise.
God called David a man after his own heart, not because David's ways were perfect, but because he regarded God, and respected His voice and choices.
When Saul pursued David wrongfully, David still held Saul in high esteem as God's chosen and anointed and therefore laid not a hand on him. Saul on the other hand was not ready to lay aside his choice for God's, and rather fought God and his servant, David.
God accepted David and rejected Saul. For God despised Saul's heart. Saul did not have a broken and contrite spirit. Saul cared about himself than the welfare of God. He did not mind giving excuses when God warned and rebuked him through Samuel. David on the other hand, as human as he was, accepted his mistakes and sins, and with brokenness of heart and spirit repented when rebuked.
The fiances of Lot's daughters in Sodom and Gomorrah mocked at God's warning to destroy their city because of their sin. Contrarily, the people of Nineveh repented profusely when God warned them by Jonah. God destroyed the fiances of Lot's daughters but spared Nineveh. This is because God despises an unbroken and unrepentant heart.
God loves the sinner but hates sin. If we continue to disregard Him and His voice, we are headed for destruction, for He despises a heart that disregards Him. However if our hearts melt at His Word, and with brokenness of heart and spirit regard Him and repent, He shall be gracious to us, forgive us and heal us.
WHAT IS NEXT?