A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 38:1To bring to remembrance, or, remind God of His mercy and himself of his sin. Appealing to God for relief from His heavy chastisement, the Psalmist avows his integrity before men, complains of the defection of friends and persecution of enemies, and in a submissive spirit, casting himself on God, with penitent confession he pleads God's covenant relation and his innocence of the charges of his enemies, and prays for divine comfort and help. (Psa. 38:1-22)
He deprecates deserved punishment, which is described (Psa 6:1), under the figure of bodily disease [Psa 38:3].
psa 38:2arrows . . . and thy hand--the sharp and heavy afflictions he suffered (Deu 32:23).
psa 38:4iniquities--afflictions in punishment of sin (Sa2 16:12; Psa 31:10; Psa 40:12).
gone over mine head--as a flood.
psa 38:5The loathsomeness, corruption, and wasting torture of severe physical disease set forth his mental anguish [Psa 38:6]. It is possible some bodily disease was connected. The
loins are the seat of strength. His exhaustion left him only the power to groan [Psa 38:9].
psa 38:9That God can hear (Rom 8:26).
psa 38:10My heart panteth--as if barely surviving.
light . . . from me--utter exhaustion (Psa 6:7; Psa 13:3).
psa 38:11Friends desert, but foes increase in malignity.
psa 38:12seek after my life-- (Sa1 20:1; Sa1 22:23).
psa 38:13He patiently submits, uttering no reproaches or replies (Joh 19:9) to their insulting speeches;
psa 38:15for he is confident the
Lord--literally, "Sovereign" (to whom he was a servant), would answer his prayer (Psa 3:4; Psa 4:1), and not permit their triumph in his partial halting, of which he was in danger.
psa 38:18Consciousness of sin makes suffering pungent, and suffering, rightly received, leads to confession.
psa 38:19Still, while humbled before God, he is the victim of deadly enemies, full of malice and treachery.
enemies are lively--literally, "of life," who would take my life, that is, deadly.
psa 38:21(Compare Psa 22:19; Psa 35:3). All terms of frequent use. In this Psalm the language is generally susceptible of application to Christ as a sufferer, David, as such, typifying Him. This does not require us to apply the confessions of sin, but only the pains or penalties which He bore for us.