I sort of tracked when I felt decent vs miserable, and the biggest correlation I found was sleep. If I got enough sleep, everything was just better.
As for the oscillations between sadness and confidence, that will just happen. Eventually the sadness happens less and less. It won't happen fast, but it will happen.
I remember the surprise I felt the first day I was almost glad she left, because I was no longer living with the tyranny of someone who wouldn't do anything for herself to feel happier, and then would blame me for it. I still miss her terribly, but I miss her as she was, not as she is currently.