You may have found what you think is the perfect girlfriend, but the way things are going with her, you have not created the perfect relationship. It’s perfectly fine to feel a little bit sad when your loved one goes away, but it sounds like you are putting your girlfriend in the position of being all things to you and this is unhealthy. For any two people to have a truly healthy relationship, they have to realize that each of them are good, fun, smart, reliable people in and of themselves. Not just when they have been paired up with this other supposedly perfect person.
You both have to have your own sense of self, which involves knowing what kind of person you really are, having your own interests and desires, despite the fact that you are in a relationship. Hopefully it is your independent self that your girlfriend found attractive in the first place. People should not jump into relationships to rescue the other person or to be saved by the other person
You should be able to have a good time on your own, doing things that are of intererest to you without worrying that the other person might leave you, or that you are less than a whole person without that other person around. Unless your girlfriend is untrustworthy, then you should be able to trust her, and know that she is probably going to do fun and interesting things that are important to her, when she is away from you too.
Healthy relationships thrive when independent, good, nice, smart, fun people get together and they each appreciate the other person for who they really are. But they don’t expect the other person to become an appendage or a conjoined twin.
Not sure how old you are. If you are over 18, you guys might consider getting some very short term couples counseling to see how you can better accomplish creating a secure relationship while at the same time remaining autonomous people.
If you are under 18 you might consider talking to your parents or your school counselor about the fact that you are in fact suffering from depression and are having a difficult time concentrating. Love is complicated and you do have to work hard to make it work, but love should be a joyful thing, not a painful thing. Good luck to you and your girlfriend : )