When David prays in the Psalms often we see a great desire to be right with God. Everything and anything is expendable. In this passage we see him throwing pride to the wind if it will eliminate barriers between him and God.
Do not let my heart incline to any evil,
to busy myself with wicked deeds
in company with men who work iniquity,
and let me not eat of their delicacies!
Let a righteous man strike me—it is a kindness;
let him rebuke me—it is oil for my head;
let my head not refuse it.
Yet my prayer is continually against their evil deeds.
(Psalm 141:4-5 ESV)
McCheyne’s Bible Reading Plan: Jos 9, Ps 140-141, Jer 3, Mt 17