Friendship advice. I need help ASAP 😭

I know I’m the “bad guy” but I need some advice. I’m 15 years old and close to sitting my GCSEs.

So basically I’ve known my best friend for 5 years (but haven’t been best friends for that long). And I made up a story that I was going out with this guy. I did this because all the kids in my school are in some sort of relationship and I thought that if my life didn’t sound interesting enough nobody would like me. So this story escalated over a span of 5 years.

Me and my best friend got really close over the past couple of months. But I’m glad we did because we have both been going through hard times. Over the past year I’ve started to become suicidal and hated life.

So me and my best friend started talking about this “guy”. And she started asking me loads of questions, so I got really scared. She asked me whether I was lying about this guy. So I replied “no I’m not lying” but I couldn’t just say I’m lying so I had to say no. She then had a whole rant at me saying that she didn’t believe me and she’s asked other people about this and they all think I’m lying.

About an hour later I texted her explaining everything and why I made it up. But instead of tying to understand me she just told me that our friendship is over and that she doesn’t know if she will trust me ever again.

The next day at school the people I considered my friends all ignored me and didn’t talk to me. So I think my best friend might have told them, and if she has I’m going to be even more upset.

I know that I shouldn’t have lied. But should this affect our friendship so much to the point where she is ghosting me?? Can someone please give me some advise? I can’t live without by best friend she meant the world and more to me.