A: Your toddler is clearly distinguishing between you as mother and the teacher--since he goes to pieces with you, and yet is cheerful in day care. That's great! His emotional relationship with you is deep and intense, and he understands perfectly well that his teacher is not his mother.
Many children of 2 1/2 have tantrums. The tantrum reflects an emotional state that is too much for the child to manage--anger and frustration and sadness. I would suggest that your goal would be to soothe your son, as best as you can. The idea is to end the tantrum with the least escalation and without adding aggression. Hitting a child may seem to "stop the behavior" in the short term, but it only makes for trouble in the long term. The child learns that hitting and intimidation are useful, and stores up rage inside that will surely come out sooner or later in another form.
Children of this age are especially attuned to the ideas of desertion, reunion, and control. Your son has no doubt figured out that getting dressed and out the door is an indication that you are preparing to be absent from him--something that he cannot really understand, control, or cope with--just yet. If he were older, he might complain that he feels pushed aside and rejected at these times. Right now, he just feels furious and wild. Time will fix this. Right now, you want to be as patient and soothing as you can.