By the way, Psalms 38 is written by David and some speculate that this may have been one of his prayers regarding his sin with Bathsheba and Uriah.
Once you come to the realization of the seriousness of what it means to sin, the weight of it is unbearable. The psalmist paints a very vivid & accurate picture of what the burden of sin is like. In verses 1 & 2, it almost sounds like he is blaming God, however, if you read on, in verse 5 you see that he is quite clear that this is his own doing, a result of his own "foolishness." However, God is convicting the author. God has been quite clear what He expects out of us, yet we are so arrogant & prideful that we think we know better than the Lord & we take things into our own hands, we do things our way. That is sin. God has also been quite clear as to what the penalties of sin are (Romans 6:23).
1 O LORD, rebuke me not in your anger,
nor discipline me in your wrath!
2 For your arrows have sunk into me,
and your hand has come down on me.
3 There is no soundness in my flesh
because of your indignation;
there is no health in my bones
because of my sin.
4 For my iniquities have gone over my head;
like a heavy burden, they are too heavy for me.
5 My wounds stink and fester
because of my foolishness,
6 I am utterly bowed down and prostrate;
all the day I go about mourning.
7 For my sides are filled with burning,
and there is no soundness in my flesh.
8 I am feeble and crushed;
I groan because of the tumult of my heart.
9 O Lord, all my longing is before you;
my sighing is not hidden from you.
10 My heart throbs; my strength fails me,
and the light of my eyes—it also has gone from me.
11 My friends and companions stand aloof from my plague,
and my nearest kin stand far off.
12 Those who seek my life lay their snares;
those who seek my hurt speak of ruin
and meditate treachery all day long.
13 But I am like a deaf man; I do not hear,
like a mute man who does not open his mouth.
14 I have become like a man who does not hear,
and in whose mouth are no rebukes.
The whole purpose of "the Law" is to convict man of his sin. To make him aware of what a wretched soul he is & to make him realize his need for a Savior. Once he accepts Christ as his savior, his remorse of his sin aids him in repentance. It drives him to leave the life he lived prior to his conversion & reminds him when faced with temptations again.
What the psalmist writes here is what we should all feel when we consider how we have blatantly offended our Creator and the one who gave his life so that we may be free from the eternal punishment of our blatant hatred of the One who loves us more than anyone on Earth could ever even consider loving us.
There is so much in these last few verses of Ps. 38. First, he is waiting on the Lord & knows God will answer him despite the crushing reality of his sins. God is just waiting on us to cry out to Him. And, then he does. He confesses his iniquity & repents.
15 But for you, O LORD, do I wait;
it is you, O Lord my God, who will answer.
16 For I said, “Only let them not rejoice over me,
who boast against me when my foot slips!”17 For I am ready to fall,
and my pain is ever before me.
18 I confess my iniquity;
I am sorry for my sin.
19 But my foes are vigorous, they are mighty,
and many are those who hate me wrongfully.
20 Those who render me evil for good
accuse me because I follow after good.21 Do not forsake me, O LORD!
O my God, be not far from me!
22 Make haste to help me,
O Lord, my salvation!
David then goes on to talk about how he following God but there are those out there that want to trap him, to get rid of him, to do harm to him just because of his loyalty to the Lord.
This whole passage is almost a mirror of many true Christian's lives. First, you realize the weight of your sin, then you confess it to the Lord, next you start following Christ & living the Christian life, what follows are people (many times friends & family) who begin to hassle, harass, & attack you for doing what is right. In some countries & religions, this conversion can cost you your family, your job, your freedom, & even your life. The life of a Christian is not easy, it is not for the weak.
But David ends the whole passage with a cry out to the Father. Despite realizing his wretchedness, being abandoned by his friends & family, & being actively pursued by people who want to do him harm; David knows he can rely on his King, his Salvation.