Sorry to say but it seems you are reacting to everything way too much IMO. You need to work on your mindset more then variables IMO. We all have good days and bad days. Even possible to have a bad week, hell a month, if we are too stressed about one thing or another. I know this from experience, and trust me in the last 17 years I'm monitoring/adjusting myself like to participate in the Olimpics, if thats one thing I learned, that's exactly this. ANXIETY kills everything and everyone. If you can't handle that shit it will eat you alive.
If coffee don't agree with you- drop it. Drop the tea, fuck em all. I love coffee and tea and can't drink any of them, so what? I don't give a damn, I don't stress about it, I find solutions and not problems. For me feeling good is > anything BUT I will take occasional risks for what I really love and crave even knowing it will mess me up for a while and I'm perfectly fine with that. The more I do it now, the less I'll do it later, cuz I'm learning my lessons,hopefully, as time goes by. And trust me I've been in every shithole you can possibly be. This is how we progress.
I love stimulants but I don't do them cuz they wind me up and effects me 10x like my girl for example. She can drink her energy drink and go to sleep, easy, not even talking about coffee. I love coffee, but most of the time it messes up my stomach and if that happens I feel like shit for the remaining part of the day. And fuck that, I can't allow that to happen, I'm not rich to be able to waste all day feeling garbage. Even though I love the buzz it gives me and been doing it for decades. We not getting younger, it's also a good one to remember.
So my advice to you would be work on your mindset and start mastering yourself because it will take a lifetime to achieve. The work is never done. Is always in progress. And just be happy, do what you live, try to minimize your daily stressors and live your best life possible. Try to be as consistent as possible on what works for you and what not. Be diligent in your work and remember that we all have our own struggles we must cope with and theres nothing you can do just to get stronger inside and outside out.
Hope that clicks with you, because I just gave you 20mins of the most precious commodity in our lifes- time.