You are not alone. Feeling stressed, lonely, and overwhelmed comes into our lives every now and then.
You figured out what is best for you and managed your day according, a big hug for you.
Giving yourself time, talking about your mental health, and walking away to relieve yourself; you did the right thing.