When we want to be alone, it can come from different motivations. It can be an instinct to recharge (introversion) or an instinct to isolate in pain (avoidant/dismissive attachment style).
1. Honor introversion. Go get you some alone time and charge that battery!
2. Let go of the old avoidant pattern tho.. Heal the wounds beneath the insecure attachment response and learn to let people care for your pain with you.