This is an interesting philosophical question that I've pondered on before: When is a man, if ever, justified in breaking the law?
It depends, in part, on how one defines the function of government to begin with, and whether the state exists to serve man or man exists to serve the state, of course. One must also mind that niches such as 'defensive murder' are typically covered in law; a person is not usually punished for defending themselves against another trespassing on their property who has just killed their entire family and who has shown definite intent to kill the person in question who has therefore murdered the offender. So to say 'in defense for my life' directly is not really a valid answer to the question, unless we're also examining Christian laws, which I am also open to if Christians would like to add their two cents on whether it's ever okay to break one of the ten commandments. Interpret this question however you can best answer it.
I'll add my own two cents later on, I don't want to affect anyone's answer with examples right away.