Is it at all possible (or safe) to pursue a pilot's license with a history of mental illness? I am in my late twenties. To put it bluntly I have a history of mental illness going back to my teens. My quick summary:

Diagnosed with depression and prescribed Wellbutrin in my teens. I discontinued without doctor approval and stopped going to psychiatry.
Diagnosed with ADHD in college and prescribed a litany of drugs to &quot;try&quot; including Adderall, Ritalin and Vyvanse. All were stopped with approval by my doctor because of horrible side effects and lack of any therapeutic effect.
Mid 20s (~1 year ago) had an anxious breakdown due to an online harassment campaign and voluntarily committed to a mental hospital, spent 48 hours there. Left the hospital with an SSRI and Klonopin (benzo) prescription.
Recently I discontinued SSRI use and switched back to Wellbutrin, have not taken Klonopin in 6 months or so but my doctor has had me keep it around in case of panic attacks.

I would say I have my depression under control but I have had 1 panic attack in the past six months.
I have been interested in aviation since I was a child and recently considered the idea of potentially pursuing a PPL, but I'm not hopeful. I'm 100% certain this would not be possible in the near future due to my current medication (Wellbutrin.) My doctor is confident that I can taper off this medication in the next 3 months however, and he views me as more or less stable. I don't feel anxious or depressed anymore and I haven't in some time. I like to think this is all behind me.
Is there any chance of attaining a medical in the far future (maybe 3 years of total stability from now), or is it pretty much not going to happen in this lifetime? Is it even a good idea to attempt to learn to fly, or should I stay far away from an airplane forever given my history?
Thanks for reading.
I have no medical degree, but I can give you some things to consider:
Even as a hobby, flying is at times a high stress environment. You must stay alert at all times, and the ability to maintain functionality even when all hell breaks loose is highly desirable. It's not all clear blue skies and three degrees of freedom. You got checkrides, new things to learn, old things to remember, and pretty much everything you do might end up badly.
You correctly point out that medication that effects cognitive capabilities is a strict no-go. As such, a history of using them might not exclude the possibility of ppl level medical certificate, but would require jumping through some hoops, with no guarantee of succes.
Any history of suicidal tendencies is pretty much a 100% no-go. Just a not, you do not mention this, but I'll let the cat out of the bag anyway.
Your anamnesis has quite a listing of various mental issues. You do realize this is a major obstacle, which is a good start. Loading high expectations on PPL licence would not serve your recovery well, but my non-expert opinion backed up by some real life examples is, that a person can shed even quite severe mental issues, and regain &amp; maintain &quot;full functionality&quot; without any medication.
In your case the minimum requirement would be a long period of stability. Be honest to yourself and do not push it. If you get on top of things naturally, you might be good to go for PPL in some point in future. But do not risk you mental health on it, not but pushing towards it, and not by hanging on to it if you get there. As I wrote in the beginning, flying is a high stress environment at times, and it can trigger all kinds of unexpexted reactions. There is absolutely no loss or shame in putting the safety of yourself and the others above your dreams.
Flying is so much fun it's hard to describe it, but there are many other things just as fun, even more so.
Dream big, but don't let your dreams run you, or they will ruin you.