Search me, O God, and know my heart!
Try me and know my thoughts!
And see if there be any grievous way in me,
and lead me in the way everlasting!
This prayer at the end of Psalm 139 invites the Lord to scrutinize and reveal our most wicked thoughts. Why? I think it is so we might know that He knows us. And in our knowledge and recognition that He knows the worst in us, we are moved to repent of our sin and throw our souls upon His mercies. This repentance then puts us back on the ancient path that leads to everlasting life.
When I think about it, the stupidest action in the world is to pretend to hide my sin from God. Adam and Eve tried it at the very beginning with fig leaves in the bushes in the garden. Bad choice, there! Every sin, even ones against other people, is always a sin against God first. And He knows everything, including my sins of thought. He knew all my sins before He even made me in my mother's womb. And He sent Jesus to die for them while I was lost, hopeless and helpless, in my sins.
The best way to live my life then is to acknowledge this truth. God knows my sin and I might as well admit it. He knows I am a sinner by choice and an alien by birth. But, Praise the Lord, Christ died for my sins! Even as a Christian, I must confess sins, repent of sin, trust God and His Word for the proper way to put off sin and put on holiness, and find in His Son and in the Spirit's work that God will see me as righteous in Christ and gloriously remake this old sinner into something holy. Honest confession is one of the most important of spiritual practices and priorities for me.