It wasn't working. You were already having a hard time with the relationship after just three months. If you'd stay, you'd just be continuing to struggle with the same issues you had before. Missing somebody after you've just left them is normal. It doesn't mean the relationship shouldn't have ended
You should really give yourself a few more months to get past your feelings for the previous girl and figure out what you really want from this last one. It will work out one way or the other. There are always opportunities to meet new women. You can't let fear dictate your life.
“This planet has - or rather had - a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movement of small green pieces of paper, which was odd because on the whole it wasn't the small green pieces of paper that were unhappy.” ― Douglas Adams, The Hitchhiker's Guide to the Galaxy