The following is from a message by C. H. Spurgeon.
Look upon my affliction and my pain--and forgive all my sins! Psalm 25:18
"It is well for us when prayers about our sorrows--are linked with pleas concerning our sins; when, being under God's hand, we are not wholly taken up with our pain--but remember our offences against God. It is well, also, to take both sorrow and sin--to the same place! It was to God--that David carried his sorrow. It was to God--that David confessed his sin.
We must take our sorrows to God. Even your little sorrows you may roll upon God--for He counts the hairs of your head. And your great sorrows you may commit to Him--for He holds the ocean in the hollow of His hand. Go to Him, whatever your present trouble may be--and you shall find Him able and willing to relieve you.
But we must also take our sins to God. We must carry them to the cross, that the blood may fall upon them, to purge away their guilt, and to destroy their defiling power.
The special lesson of the text is this--that we are to go to the Lord with sorrows and with sins in the right frame of heart. Note that all David asks concerning his sorrow is, 'Look upon my affliction and my pain.' But the next petition is vastly more express, definite, decided and plain, 'Forgive all my sins!'
Many sufferers would have put it, 'Remove my affliction and my pain--and look at my sins.' But David does not say so--he cries, 'Lord, as for my affliction and my pain, I will not dictate to Your wisdom. Lord, look at them--I will leave them to You. I would be glad to have my pain removed--but do as You will. But as for my sins, Lord, I know what I want with them--I must have them forgiven! I cannot endure to lie under their curse for a moment!'
A Christian counts his sorrow lighter in the scale--than his sin. He can bear that his troubles should continue--but he cannot support the burden of his transgressions."