We were created by God with an upright character, but sin has caused us to lose our integrity. The Christian walk has restored us to our original high calling to live lives of integrity, ever displaying nobility of character. It is instructive to read the stories in the Bible of the judges, kings, prophets, etc. and to receive from those stories the importance of having good judgment, mercy, faith, love, while honoring the law of God. David’s prayer is for God to maintain him in his integrity, David knowing that this is only possible through God’s help.
Psalms 41:11 By this I know that thou favourest me, because mine enemy doth not triumph over me. 41:12 And as for me, thou upholdest me in mine integrity, and settest me before thy face for ever. 41:13 Blessed [be] the LORD God of Israel from everlasting, and to everlasting. Amen, and Amen.