How do I feel better in this situation?

Circumstance: I have bipolar, suffer from insomnia, and need to be on medication. Almost every morning I feel extreme exhaustion while at work due to lingering effects of the medication and insomnia. I feel so tired and sick I just want to go home and back to bed but instead sit at my desk falling asleep.
Thought: It’s so horrible.
Feeling: I want to scream it’s so agonizing
Action: I don’t really accomplish any work. I just sit at my desk for hours. Sometimes (most times) I eat something sugary.
Results: Discouragement. Feel like a failure at work and am not seeing the weight loss I want to.

I’m new to self coaching scholars. I actually haven’t even gotten my bonus box yet. I’ve been trying to follow your podcast program for months. I would wait and work on your program now that I’ve joined, but I feel so discouraged about this, I wanted to ask for help now. I honestly feel like quitting my job sometimes. I just hope there’s a better way to deal with this. As I wrote out my attempts of using the model, I think I see a glimmer of hope where I can change some things. Can you help me with this?