It's perfectly normal to feel lonely and sad right now! In time, that feeling will go away. You may never forget this girlfriend, but it was in your best interest to end things with her.
I suggest focusing on other things to take your mind off her and to reduce the temptation of asking her to get back together with you.