Ice and Elevation
If your hand swelled up after punching a wall it is highly likely that you broke something in your hand.
You should get it checked out and x-rayed to make sure.
Acute treatment for any type of potential fracture
is to apply ice, and elevate the injured part above your heart
Stop hitting walls with your hand.