Acknowledge when you are mistaken and have the same enthusiasm in the correction, as you did in the erroneous behaviors. The mistake can be a test of your character and show you where growth is needed.
Accepting your flaws as flaws and refusing to justify them is the difference between a king and a fool. Who you are is exhibited in the trying times and what you truly stand for is made clear under pressure.
This is the stark difference between King Saul and King David. When the intentions of your heart are confronted, how do you respond? If you answer in pride or find ways to rationalize your actions, I do not have your heart.
Your heart is what matters. A flawed man, with MY heart, beating within him is better than the tallest, the brightest or the most popular among you. Obedience is the preferred offering in the eternal realms.
1 Samuel 28:17-18
The Lord has done what he predicted through me. The Lord has torn the kingdom out of your hands and given it to one of your neighbors—to David. Because you did not obey the Lord or carry out his fierce wrath against the Amalekites, the Lord has done this to you today.