David is a type of Job.
Comparison of David and Job
Similarity
Psa 38:2 For thine arrows stick fast in me, and thy hand presseth me sore.
Job 6:4 For the arrows of the Almighty are within me, the poison whereof drinketh up my spirit: the terrors of God do set themselves in array against me.
-------------------------------------------------------------------------------------------------------
Psa 38:3 There is no soundness in my flesh because of thine anger; neither is there any rest in my bones because of my sin.
Job 30:17 My bones are pierced in me in the night season: and my sinews take no rest.
-------------------------------------------------------------------------------------------------------
Psa 38:6 I am troubled; I am bowed down greatly; I go mourning all the day long.
Job 23:15 Therefore am I troubled at his presence: when I consider, I am afraid of him. Job 30:28 I went mourning without the sun: I stood up, and I cried in the congregation.
---------------------------------------------------------------------------------------------------------
Psa 38:11 My lovers and my friends stand aloof from my sore; and my kinsmen stand afar off.
Job 19:19All my inward friends abhorred me: and they whom I loved are turned against me.
-----------------------------------------------------------------------------------------------------------
Diversity
Psa 38:21 Forsake me not, O LORD: O my God, be not far from me.
Job 10:20 Are not my days few? cease then, and let me alone, that I may take comfort a little, Job 7:19 How long wilt thou not depart from me, nor let me alone till I swallow down my spittle?
-------------------------------------------------------------------------------------------------------------------
Psa 38:18 For I will declare mine iniquity; I will be sorry for my sin.
Psa 38:5 My wounds stink and are corrupt because of my foolishness.
Job 9:17 For he breaketh me with a tempest, and multiplieth my wounds without cause.
---------------------------------------------------------------------------------------------------------------------