Another rapid downfall.. Just when I thought it was looking up

I dont understand why it is soo hard to have a friend....

I've had a sort of really close and only friend for a long time that keeps me from going insane... She has been gone for a week because of the flu. Well last night while she txt me she said she wasn't going to my school anymore.....
I was surprised and not in a good way... I burst out crying because I thought she was gonna be he lucky one that actually stays with me and be a friend.... She doesn't know what I'm struggling with she doesn't know the pain I am in she only knows what I let her know but still she can always tell when I'm not in the greatest mood and she finds a way to change that

I know this shouldn't be a big deal cause there are plenty of people in the world to make friends by that's the thing..... I go to a small school I've tried every group of "friends" and every time when I think I finally found a BFF like in the movies. I get pranked.... This isn't the frost time so I feel more stupid thinking this would actually be different...

I always tell myself to get back it there and shake it off but ..... Idk what to do now she was the person that I sat with at lunch walked to classes with do homework together sleep over watch movies...

I just got my grades up before this and I thought everything was looking up soo that should have been a sign

Sure we hung out in a "group" but really she was the only one who wanted to hang out with me... Now I don't even eat lunch because I'm afraid if I take too long the "group" will leave and I would look like a loner..... She doesn't want me to tell anyone.... "the group" today was asking where she was and I said tha she had the flu which she did.... And everyone misses her.....
No one else here I can trust and it's hard to act like ur happy when ur standing by ur locker alone like a creeper.....

I told my mom this first the good part then the bad part. I goof in an argument with her about my good grades!!!! She doesn't think its enough and she scolded at me for being happy....
Then I told her about my friend leaving she was like Awww to bad... And that was he end of the conversation.....

Honestly I don't know why this keeps happening and I don't know how to look at the upside of this....