Help please what’s this called

Whenever I'm around ppl, I'm super happy and energetic; they kinda help me forget and just have fun. But when I'm alone, I spiral and cry and I've hurt myself before. I've considered ending it but not seriously. I just want to know what's going on.