David described his condition in extreme (hyperbolic) language to indicate how terrible he felt. Evidently his adversaries had been responsible for his condition to some extent, perhaps by inflicting a wound. [source][source][source]
"From my own experience and pastoral ministry, I"ve learned that sickness and pain either make us better or bitter, and the difference is faith." [1][source]