It will pass, jealousy is a very normal in older children used to being the only one, they feel usurped and hurt, very often they see baby getting the attention that was all theirs. Sometimes they regress back to wetting and behaving in a baby like manner, even speaking in baby words. He is upset, make sure you and his Dad give him one to one time , so he knows he is still special to you ,you say you have meeted out punishments even spanking ,which in fact makes the issue worse and you are teaching him hitting is okay so he will do it to his sister .Focus on his positive side and praise him when you see him doing something right .good luck