I know exactly how you feel. And that's not in the cliche sense either. Recently I had felt horrible whenever I wasn't around friends. Just relax and try to become more focused on the present. I'm not sure if it's the same with you, but I was feeling horrible because I always thought "What if I never have as good of a time as I have just now?" and I only felt good around friends. Just make sure when you're around your friends that you know that there will be much, much more time in your life to be with friends and family, and remember how incredible your time is when you're around them.
I hope I helped
"What do we live for, if not to make life less difficult for each other?"
-George Eliot
"Each morning when I open my eyes I say to myself: I, not events, have the power to make me happy or unhappy today. I can choose which it shall be. Yesterday is dead, tomorrow hasn't arrived yet. I have just one day, today, and I'm going to be happy in it."
-Groucho Marx
"Don't be afraid your life will end; be afraid that it will never begin."
-Grace Hansen