What law does apply to this. Genuine question, I don’t know, not trying to catch you out.
Basically you can use any "reasonable" level of force to protect yourself and family.
Reasonable meaning what could be considered reasonable in the moment, which basically means as long as you don't lay in wait, set traps, use illegal weapons, or beat someone when they're no longer a threat (IE already down and unconsciouse, shoot them in the back, chase them down the street, tie them up and torture them) you're pretty much fine. The Police will investigate if there is serious injury or death, and may arrest you to ensure your rights are covered (you are entitled to a free solicitor etc and it restrains what they can do), but basically if your house is broken into you have to go massively over the top for any charges to be brought, and even further over the top for a jury (remember they are 12 people like you) to even consider finding you guilty.
As I say, as long as you don't set out to kill someone, but happen to grab a knife in the kitchen, golf clubs, the hammer you've been using for decorating, the cricket bat next to the sporting cloths, a harpoon from the cupboard next to you where your scuba gear is stored you're basically ok (these are btw all real instances).
IIRC it's not so much a specific "law" as written down by the government, but rather largely case law over the last few hundred years where courts have defined what is likely reasonable etc.