So you've been told you're bi-polar. Now what?
Well, if you need to take drugs to pick you up or bring you down, take them. However, at the same time you need a long term, personal solution. You don't just want to survive. You want to thrive and there's no reason you can't get back on that road.
First you need to recognize that your feelings, your emotions, your state of mind, and by extension your thought processes are all chemically generated. When the system is working perfectly, chemicals are released that make you "feel" a particular way that can subconsciously alert you to circumstances and conditions you may not yet be consciously aware of.
The "chemical imbalance" you have been experiencing is the consequence of a malfunctioning emotional system. Since each person's emotions and reactions to them have been personally developed and customized from birth, there is no drug that will enter your system and suddenly put everything back where it should be. There is however, a work-around.
The most powerful counter-measure: Objective logic and reason. You are not your emotions, or even your brain. You are the self. You are the driver of this vehicle. You are not the vehicle. If the vehicle pulls to the left, over-steer to the right. In other words, recognize the malfunctions and adjust to them. Do not respond immediately to your emotions, feelings or even thoughts. Take the time to objectively evaluate your situation and determine if what you're feeling and thinking is in sync with what's actually going on around you or in your life. When you have an idea you believe is brilliant, don't immediately act on or share it. If it's truly a great idea, it will still be great tomorrow, next week and next month. Time test it. Write it down. Let is simmer. Come back to it later and see if it still has the same appeal it did originally.
This may slow you down at first, but with constant self-training you will wind up with a new way of processing both internally and externally generated data that is just as quick and effective, if not more so, than what you had before. It will force you to think and act deliberately instead of just automatically responding to chemical stimulus. It will make you more aware, alert and prudent than the average "normal" person.
In martial arts one is taught to use the weight of one's adversary against them. Dealing with bi-polar disorder is no different. Become intimately familiar with it. Bend it to your will. Never let your body, your brain, your emotions forget who's in charge.