David did not minimize his sin. He did not attempt to justify it. Nor did he blame it on others.
Rather, he was aghast at what he had done and simply prostrated himself before God and implored His mercy and forgiveness. He made no attempt to "explain it away." He confessed what he had done, what he was, and asked God to clean him up totally.
That is the basic attitude we should have when we repent of our sins.
David was one of the few people of Old Testament times to whom God gave the Holy Spirit (verses 10-11; I Samuel 16:13), for the Holy Spirit was not yet made available (John 7:38-39) except in special circumstances. David obeyed God and overcame by the power of the Holy Spirit, even though at times he did stumble and fall. "For a just [righteous] man falleth seven times, and riseth up again" (Proverbs 24:16).
So David—a man after God's own heart—is soon, at Christ's coming, to be resurrected and born into God's Kingdom as a son of God, and as the King over Israel (Jeremiah 30:9).