Breaking someone's legs requires excessive force, so no, you would not be within your rights to break someone's legs for punching you in the face. That would absolutely be an escalation of force and not legally defendable.
In order to shoot someone in self defense, you have to prove that you feared for your life. Its not a get out of jail free card.