Please give your advice if you are a successful software developer at a major company, despite having a serious mental condition such as bipolar or schizophrenia.
Did you disclose your condition to your employer/coworkers?
Does your employer offer you any accommodations?
Do you have any other advice?
Accommodations are available for illnesses and disability but it's worth remembering that FAANG and similar companies are highly competitive and it's "either up or out" until you're promoted to the terminal level where that's no longer required. If stress exacerbates your illness, keep that in mind.