According to Acts 13:22, God had declared that David was a man after His own heart. Now there are those who have a bit of a problem with that because as we all know, David did do some things which definitely were not pleasing to God. If that was the case, they reason, this statement could have only been applicable sometimes. What we fail to realize is that God sees the whole story in it's entirety while we are restricted to a few sentences at a time if even that.
One of the things which made David unique in comparison to Saul was the simple fact that when David was confronted by God about his sin, he acknowledged it, confessed it and repented of it. Saul on the other hand, would attempt to excuse himself or justify his actions.
Newsflash! God knows that we are going to make poor choices in this life. He knows that we are constantly facing the temptation of the flesh to do what we want, the way we want. Nothing we do ever takes God by surprise. He knows exactly how far we can fall and He knows that our best intentions simply are not good enough. That's why we need a Savior!
However our response to what we do when confronted by our sin, our mistakes, our misconceptions, even if they were well-meaning, is critical. Are we going to be respond like King Saul and continue doing what we believe to be best and justify our actions? Far too many people have done things they should not have done or said things they should not have said and justifying their actions by calling it "ministry" or claiming that God told them to do so.
God is crying out for His people to cry out as David did in his Prayer of Repentance which is found in Psalm 51.
Have mercy upon me, O God, According to Your lovingkindness; According to the multitude of Your tender mercies, Blot out my transgressions.
Wash me thoroughly from my iniquity,
And cleanse me from my sin.
For I acknowledge my transgressions,
And my sin is always before me.
Against You, You only, have I sinned,
And done this evil in Your sight—
That You may be found just when You speak,
And blameless when You judge.
Behold, I was brought forth in iniquity,
And in sin my mother conceived me.
Behold, You desire truth in the inward parts,
And in the hidden part You will make me to know wisdom.
Purge me with hyssop, and I shall be clean;
Wash me, and I shall be whiter than snow.
Make me hear joy and gladness,
That the bones You have broken may rejoice.
Hide Your face from my sins,
And blot out all my iniquities.
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.
Restore to me the joy of Your salvation,
And uphold me by Your generous Spirit.
Then I will teach transgressors Your ways,
And sinners shall be converted to You.
Deliver me from the guilt of bloodshed, O God,
The God of my salvation,
And my tongue shall sing aloud of Your righteousness.
O Lord, open my lips,
And my mouth shall show forth Your praise.
For You do not desire sacrifice, or else I would give it;
You do not delight in burnt offering.
The sacrifices of God are a broken spirit,
A broken and a contrite heart—
These, O God, You will not despise.
Do good in Your good pleasure to Zion;
Build the walls of Jerusalem.
Then You shall be pleased with the sacrifices of righteousness,
With burnt offering and whole burnt offering;
Then they shall offer bulls on Your altar.
This needs to be our prayer daily, so that our lives might be pleasing and acceptable to Him and that we might also be people after His own heart.
I should know psalm 51 by heart haha, all kidding aside this is probably my favorite of the psalms, not sure if you are familiar with a preacher named steve Lawson. you would be blessed to hear his sermon on psalm 51, its about how sin effects the believers life. excellent!!