You run the risk of injuring your hand or punching a hole in the wall. Moreover, recent research suggests that acting out like this leads to more anger, not less.
While hitting a while is a better option than hitting a person it will still not resolve your problems and violence is never the answer. Try taking a walk.