Good for you for breaking up with the girl. I was not so wise as you, and through college & medical school, while I was in the closet, led a girl on for many years. Something I really regret.
As someone who bowed to parental pressure and went to medical school instead of doing what I really wanted -- which was to become a mathematician -- all I can say is: try your best to do what YOU want to do. Physics, music, writing, whatever. I can't promise that it will all work out though. In my case, my parents threatened ejection from the house and withdrawal of financial support if I didn't major in biology, so had I insisted on my way, I might have become homeless and destitute, dropped out, and gone nowhere at all. I was a wimp and not willing to take the gamble, and thus here I am. At least I enjoy what I'm doing (though not as much as I like math!). On the other hand, if you hate medicine, you have to convince your parents that you hate it.
In both cases (being gay and choosing your career), the key issue is being true to yourself vs. giving in to social pressure and doing what is "easy" in the short run. Do your best to be true to yourself.
You're getting started on the right path early.