Psalm 139 makes it very clear that God has been with each of us and mindful of us before we were born. He is our original designer and this is more original to us than our sins! At the end of the prayer, it says "See if there be any wicked way in me and lead me in the everlasting way." In Hebrew, it literally says, "See if there be any way of pain in me." This language fits so much better with the tone and texture of David's prayer.
Our pains or griefs can become embedded in our hearts by the injustices of others, our own wrong reactions and failures or by challenging circumstances. Our Papa in heaven does not want such pains to drive our lives. He wants us to process them with Him in order for sweet resolutions to take root.
Forgiveness toward others, ourselves and expressing trust in His goodness over our lives are the pathways to freedom. We receive a healed and expanded view of God, ourselves, others, pains and challenges, life and the future.