Feeling extremely lonely and hopeless after trip with close friend

I have a really close friend, and yesterday I came back from a 4-day trip with her. We spent 3 nights sleeping in the same room. 

When we were heading back, I got really upset and was on the verge of tears, and couldn't stop talking about me being afraid we wouldn't have this again. Even her explicit promises did nothing to calm me down. And when she left me at my house, I did start crying. Even after she messaged me some warm things in the evening, I was still upset. 

When with her, I felt very safe, especially when asleep. I was just very surprised by my reaction to her leaving, because I was seriously upset and didn't want to talk to literally anyone but her when I got home. 

I knew I would see her again. She promised to call, text, to try and meet during term, and definitely meet in holidays. I'm just really scared of being alone again. I didn't know I wanted someone's companionship that much. This trip with her was the best one I ever had, easily- nothing else comes close. Just because she was with me. 

I have autism and severe ADHD. I've been trying to be in a relationship with someone for so long (7 years), but all I ever really wanted was companionship. But I never knew that I wanted it this badly, or that my entire happiness virtually depended on it. 

I study physics, am in my final year, and have been getting first-class grades in an excellent university for the 4th year running. If I was unable to find it, I feel like there is something fundamentally wrong and unattractive about me. But all she keeps saying is that I was just horribly unlucky and she doesn't want anything to change about my behaviour.