Really struggling with a breakup…

I’m at my lowest ever

For context My 17m , girlfriend 17f broke up with me after 1 year and 9 months. She claims that throughout the relationship i didn’t do enough to make her feel special or loved. Despite this she first said that she wanted space between us and to try again at another time, since then we’ve kept as friends but she now says that she doesn’t want to try again for the time being and doesn’t want to get my hopes up. We’ve remained in contact a few times and at college we spend the day together where she’s still really close and flirty with me . Honestly the way she switched her mind to being close and distant constantly is driving me crazy. I don’t want to lose her forever because she means the world to me, what we had felt so special and i had so much love for her beyond what i told and showed her, she truly made me so happy and thinking about our memories together is horrible because i hate that i lost it and i wanted to spend my life with her, i can’t imagine anyone being as comfortable with me and matching my personality so well and not having eyes for anyone else. Outside of her i have no real friends to help me through this and my family and i aren’t close at all, my days are spent doing nothing all the time and i can’t stop thinking about this girl. Does anyone have any advice on how to help ease my mind and not get so upset ? Or how i can work on getting her back? I’m so lost and feel as though my whole world is gone and there’s nothing left for me.