First off, I'm not sure whether by "tackle" you mean write about or you mean solve in some sense. Solve would be difficult unless one pre-decides the solution.
Second, we need to split the question between depression and suicide.
Historically, no one considered "depression" because the term did not exist (See https://en.wikipedia.org/wiki/History_of_depression ). Another article is rather anachronistic in treating "melancholy" as the same thing. In philosophy, basically no one would do that. If we re-understand the question as "feeling down", then my sense is that most philosophers throughout history would have considered it a disease rather than a topic for philosophy. The situation is of course different today (depression is not considered a sickness in the same way and philosophers do look at concepts like that).
Suicide on the other hand is something that many philosophers have treated. Here, again, there's a bit of a term problem (see SEP). But if suicide is choosing to take one's own life with a full understanding of what it means for the purpose of ending that life, then the vast majority of historical philosophers are against it.
Building from the SEP:
- Wrong for Plato - either because it destroys the body that guards the soul (Phaedo 61b-62c) or shameful (Laws IX) but with exceptions for (a) mental illness, (b) court order, (c) extreme duress, or (d) shame at evil
- Wrong for Aristotle (Nicomachean Ethics 1138a5–14) even though it is a possible free choice because it wrongs the community (remember Aristotle believes the social whole is prior to the individual).
- The Stoic views on suicide are a bit more complex. While there's the open door passage, there's also a belief in akrasia and living the fate you have been given. (in this regard, it seems closer to a rejection of per ipse suicide but an acceptance of something like Plato's extreme duress exception)
- Wrong for Augustine (Augustine, book I, chapter 20) as an extension of "thou shalt not kill"
- Wrong Aquinas (similar basis - problem of self-love
- Allowable for Hume (“Of suicide” (1783)) as a rational act.
- Wrong for Kant (MM 6:423)
- Wrong for Mill ("On Liberty") (at least according to wikipedia)
There may be some backwards causation there as the Christian philosophers may have preferred and thus promulgated views amenable to their own
Moving away from the Western canon, the Analects example is probably not "suicide" since it is saying there are things more important than our lives worth dying for (which is similar to the exception that Plato suggests) and lacks the goal of trying to die.
I'm sure further references can be added or the currents ones improved...