Kids learn by example more than by words, and they don't learn in a vacuum. If your son is affected by a bad example, which is entirely possible, then just ignoring his imitations won't be nearly as effective as teaching him what you DO want from him. So treat him the way you want him to behave, use lots of smiles and hugs, when he tried to hit, gently restrain his hands and give a positive comment like "Gentle, please."
Then, keeping in mind that a child under two or three has a very short attention span, direct him toward a happy activity, sing a song, teach him how to change gears from negative to positive.
Telling him he hurt you is fine in extreme moderation, but has the effect in the long run of "guilting" children into behaving, so it is manipulative. There's also the possibility that some day he'll be really mad and WANT to hurt you, and he'll know how to push your buttons. It's better to say something more neutral, like "Hitting hurts, let's use a SOFT touch," and use his hand to stroke you (or pet, or other child).
There are some fine resources to coach your parenting efforts into a creative and positive direction. I've had amazing success with How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish. As your child develops an ability to listen, and eventually talk, the wisdom in this book will make it a resource you reach for often. It's my all-time favorite with my nearly-5yo grandson. The techniques and ideas are mutually respectful, and they really work, with no emotional backlash.
Check out books and videos about the approach used by Dr. Harvey Karp; The Happiest Toddler on the Block. http://www.youtube.com/watch?v=fJ1428uYs2g&NR=1&a.... . He will demonstrate in this (and several related video clips) exactly how he "speaks" the toddler's language, gets on their wavelength, so they know he's on their team. This makes them happy to be on his team.