Ok first things first, did you choose a course that you wanted to do, or did you choose based on relationship? If you chose based on your own interests then I'd say definitely stick at it because you wanted to do it and shouldnt let a bad experience ruin your next step...
If youre struggling with the break up try talking to family or to some counselling services at youre uni, maybe try doing new stuff, things he never would have done so it can't remind you of him
Maybe join some new clubs, perhaps this is your chance to find out who you really are
If you like your subject then thats the most important thing, or, if you chose to follow him perhaps have a think about possibly deferring and maybe transferring to another university next year
If this is just because of the break up believe me youll come out the other side that much stronger
I dont know you or enough about you but i do know lifes too short to let someone make you unhappy and too long for regrets
For now, if youre still at uni, try to enjoy the single life maybe mr right will find you
Keep your chin up, be proud of who you are and maybe try to make some new friends
Peace