David as an Example of Humility
But what shall we say concerning David, to whom such testimony was borne, and of whom God said, “I have found a man after my own heart, David the son of Jesse; and in everlasting mercy have I anointed him?” Yet this very man says to God, “Have mercy on me, O Lord, according to Your great mercy; and according to the multitude of Your compassions, blot out my transgression. Wash me still more from mine iniquity, and cleanse me from my sin. For I acknowledge mine iniquity, and my sin is ever before me.
Against You only have I sinned, and done that which is evil in Your sight; that You may be justified in Your sayings, and may overcome when You are judged. For, behold, I was conceived in transgressions, and in sins did my mother conceive me. For, behold, You have loved truth; the secret and hidden things of wisdom have You shown me. You shall sprinkle me with hyssop, and I shall be cleansed; You shall wash me, and I shall be whiter than snow. You shall make me to hear joy and gladness; my bones, which have been humbled, shall exult.
Turn away Your face from my sins, and blot out all mine iniquities. Create in me a clean heart, O God, and renew a right spirit within me. Cast me not away from Your presence, and take not Your Holy Spirit from me. Restore to me the joy of Your salvation, and establish me by Your governing Spirit. I will teach transgressors Your ways, and the ungodly shall be converted unto You. Deliver me from blood-guiltiness, O God, the God of my salvation: my tongue shall exult in Your righteousness. O Lord, You shall open my mouth, and my lips shall show forth Your praise. For if You had desired sacrifice, I would have given it; You will not delight in burnt-offerings. The sacrifice [acceptable] to God is a bruised spirit; a broken and a contrite heart God will not despise.”
Source: First Epistle (New Advent)