I am desperate please help me!!!

My child is ALWAYS pulling my hair or biting me and most times it's both. It hurts like hell, he has 5 teeth. If I say no biting he laughs, if I scream or cry he isn't phased. He went through a phase of biting while nursing and after a few flicks on the mouth he stopped. But I'm hesitant to do that now because I think most of the time he thinks biting is kisses and love. He is so happy when he does it, he obviously has no idea it hurts.

This morning I was in so much pain I shrieked and swatted his butt, he cried for like 2 seconds and was at it again

He is 8 months old and I am starting to legitimately get really mad at him. He does it all day long, all day. I dunno what to do and I'm afraid I'll react in a way that might hurt him if he keeps it up because I am not happy!!