I know the concept of mental illness is invented 19th-20th century, but I'm sure that suicide and being depressed is a thing that are universal across time and culture, though they may manifest in different. It doesn't have to be academic literature, but can be anything from lines in books or quotes.
The reason I was prompted to make this is that I've found this passage from the hadith "the afflictions and the end of the world" that describes the event of the end times very interesting:
"the hour will not be established until till a man when passing by a grave of someone will say, 'Would that I were in his place"
I was caught off guard by how raw that was, considering this was recorded almost 2000 years ago
I have previously found answers by /u/sunagainstgold and /u/itsallfolklore and /u/hillsonghoods for the similar Did people in medieval ages or in ancient Greece have depression? If yes, what was the cause(s) and how did they deal with it? Was is common to commit suicide as a result of depression?
More below.