The following could be written a bit better (I haven't written it yet but seeing that it is Sunday morning and I have to start getting people ready for church I know it will be brief), but I think you will glean some help from it:
When a person deals with Malfunctioning Brain Chemistry that person needs to understand how to recognize a brain malfunction glitch in himself, and when it occurs (for it will), put a plan in place to deal with it.
You can compare this thought to dealing with other physical conditions:
A person who has congestive heart failure knows to take one of her nitroglycerin pills when an attack happens. A person with diabetes (if managing properly) knows what to do when the diabetes gets bad. You get the idea. But when it deals with Malfunctioning Brain Chemistry attacks, the treatment is a plan. When the glitch symptoms arise the person needs to put this plan in place.
What is the plan? Whatever works for that person. And if you are that person, whatever works for you.
It should consist of things you know will help you get through the glitch. Often the glitch will go away as suddenly as it hit you if you don't let yourself be drawn deep into it. If you let it pass like a storm cloud and just wait it out using the plan, it won't be able to get its hooks in you and linger.
Also, study yourself to see if anything triggers a brain glitch. Does diet, sleep, lack-of-sleep, health, stress, etc, make you more suseptible to a glitch? If so, avoid the trigger when possible.
God created our brains wonderfully. They are probably the most complex and mysterious of the body's organs. There is so much we don't know about them. Don't waste time condemning your brain if it deals with glitches. It probably means you have an extraordinary brain! Just put your plan in place. And enjoy it. It has taken me a long time to understand this. I still am learning.
"There is therefore now no condemnation for those who are in Christ Jesus." Romans 8:1