A couple of thoughts.
One is that it is good that you did decide to go get instruction it sounds as if you where diving prior to this "without any problems' that may be because you never had your mask dislodged, and freak out in the ocean as opposed to a controled enviroment.
so good for you to have the brains to go get proper instruction.
As for your instructor it sounds like he may have just lacked patients or did not know a solution for your problem.
I the classes I teach I find that the only real skill a person may have problems is the mask clearing, or removal.
I have found that the number one reason for this is because the student is a nose breather. for them to breath through their mouth is not their normal habit, I would suspect that having a head cold really bothers you because you can't seem to breath through your nose.
however if you pinch your nose or wear a mask it isn't a problem.
since your instinc says breath through the nose you probably get some water up your nose and this then freaks you out, or may cause the mamalian reflex to kick in, I do think that this is the bases of the problem
my solution:
on the surface without a mask practice breathing through your reg not your nose, make the contious effort.
then still without the mask bend over and put your face in the water
once you are comfortable with that still in shallow water kneel down on the bottom with mask in hand [what we are doing here is training you to breath through your mouth while there is water in your nose, so take your time] once you are ready put your mask on and leave it there, remember there is no difference with the mask on full of water and just hanging out underwater without a mask., now you can choose to either stand up or to clear your mask
I will assume here that you have gone over how to clear, if not just ask and i will give your several ways to try it.
once you master this in shallow water where you can just stand up any time, then deep water will be the same.
you can practice this on your opwn with a mask and snorkle, just do all the same procedures while breathing through your snorkle [not attached to your mask of course. this way you can practice on your own as long as you want in a public pool or ocean.
there is the rare case of a person not liking water on there face, or in cold water the mamalia refflex kicking in and not letting you breath. if you feel that the reasons for the difficult are either one of these let me know and i will give you some solutions here as well.
don't give up on your training because i seems that you are doing the diving anyways and even though it isn't comfortable stick with it, so that you will be around for a while.
as for your instructor, don't be to quick to blame it on him, he may have been moving along to quickly for you, if you pull him aside before or after a pool session, i am sure he will give you the extra help you need. I too have found that if i instruct a group about what we are going to do and then tell everybody to descend, and someone there says oh wait i am not ready because i did not feel comfortable with the skill we are now building on, it can throw me off. i don't respond quite the same way he did, i would say wait on top or something, but it would be hard to give you that attention right then. the attention should have been given right after you struggled with the mask clearing the first time, or even before when you where doing partial mask clearing., i might suggest that you just need to speak up rather than quit.
if you are freaking at the swim with no mask on stage then you have gone through the shallow water partial mask clear. the deeper water full mask clear, and as you said the deeper water mask removal. someone should have steped in at either of the earlier stages... either you or your instructor I am sure there where signs of discomfort