Disciplining an 18m old

Is it really possible to discipline an 18m old ?

My baby speaks & understands things we say apt for his age. However when he is so happy & excited / in affection / angry when he doesn’t get what he wants; he doesn’t know yet to channel his emotion ( as he is 18m only) - so not knowing how to express it, he bites me & needless to say it’s painful.

While I am trying to explain calmly to him that biting is not right & if he is happy he has to clap/ smile, if he likes wat I do , he should kiss me ; and when he is disappointed, he can take a hit in the pillow nearby ;

My MiL & DH just shout “ no biting” at him

And there he goes , all pout faced & teary eyes .

I feel so bad for him but may be it’s a mom’s mind & they say he needs to be disciplined.

How do I react when he bites?

How can I make him understand that he shouldn’t bite ?

And yes for his age he is constantly teething also .