Striking a child in anger is abuse. If you are abusing your child, I recommend therapy immediately, for you and for your poor traumatized child.
Using corporal punishment is debated. I, personally, don't do it because it doesn't work and seems like it teaches children to fear getting caught more than to avoid wrongdoing, but it isn't haram as long as you don't leave even a temporary red mark. It is illegal in some countries. If you live where it is illegal to strike a child, you should obviously not hit your child.