I'm particularly concerned about this quote from the OP:
> My performance never dropped, only my communication. I never stopped coding.
Specifically, I'm concerned the OP continued to write and submit code while also failing to respond to communications from the employer, without a prior explanation. As a remote employee, communication is a key part of performance. Unfortunately, if the OP was submitting code during this episode it would have signaled that they were active and working, yet refusing to communicate. Without an explanation (which was only provided later), this would easily be grounds for dismissal of a remote employee.
We don't know all the details, but it appears the OP only communicated the situation after seeing a scheduled meeting with HR, which they suspect was related to a planned firing:
> I suspected they were going to fire me (scheduled 1am call with HR) and I've decided to share with them 3 days ago my Bipolar Diagnosis.
If the OP waited until the firing meeting with HR to communicate any of these issues, it was too late. Who would fault a company for terminating a remote employee who wasn't responding to communication? If they had requested reasonable accommodations or a leave of absence prior to the suspected firing meeting, that would be a different story. However, it appears the company had no idea that the employee was in need of these accommodations or a leave of absence for the period of time leading up to these events, even though the employee continued to submit code.
The OP likely has limited time and energy at the moment. Adding an uphill legal battle which is unlikely to produce a positive outcome is not going to help that situation. It may very well be best to cut losses, focus on healing, and move on.
There's a lot of reasons to think this is a long-shot:
(a) You're non-US and abroad, so the ADA doesn't apply to you
(b) You're probably a contractor and not an employee
(c) Even if it applies, the ADA doesn't make it unlawful to fire you for poor performance
I think it's worth talking to a pro about this, but it's not worth spending a lot of money pursuing it, mostly because of (a). If you were a US resident, I'd say (b) and (c) are hurdles low enough that you could plausibly shake a settlement loose, but (a) is a very high hurdle.
"Is the charging party a U. S. citizen? If not, (s)he is not protected by Title VII or the ADA, which exclude aliens working outside the United States"
https://www.eeoc.gov/laws/guidance/enforcement-guidance-appl...
So the lack of US citizenship specifically does play a big role here. However, I pointed out elsewhere there are in some cases other laws, especially state-specific ones, which might apply, possibly :)
The person in question is a non-US citizen living outside the US. They are not covered by anything related to the US. They need to understand what the laws are in their own country, but chances are their contractor status will make it easy to dismiss them. They should read their contract, and pursue an attorney in their own country, but definitely not an American attorney.
Don't listen to people on this thread talking about "at-will employment", which (1) doesn't really apply to contractors and (2) doesn't apply to most discrimination cases, which are covered by separate laws (ADA, the Age Discrimination act, FMLA, etc).
Contractor status is one of those things you can often actually contest. Your employer referring to you as an "employee" is probably not dispositive, but there are a bunch of other tests (how much control you have over your work, etc) that an employment lawyer can walk you through.
Flip side of this: if your former employer is big and well-known, chances are they're well aware of the legal tripwires for contractors (everyone is after Microsoft infamously blew up over misclassification). Your actual contract, the one that actually got signed, probably spells out in great detail the fact that you are not a full-time employee entitled to benefits. So if it's a clueful company, it may be a steep hill to climb to argue that you were misclassified.
Terminating an employee with no previous disciplinary record right after a mental health crisis would be sketchy pretty much everywhere in the US, and most employers would be worried about legal repercussions. So it's possible that if you get a decent lawyer, you might be able to put together a nastygram that will get your former employer to cough up a settlement of some sort, rather than going to bat over your contractor status, which would be expensive for everyone.
Best of luck.