Anyone can use reasonable force to remove a trespasser from thier home, and anyone can use reasonable force to in self defence if they have an honestly held belief that they, or someone else, is in fear of imminent violence. There is no precise legal definition of what is reasonable and each case will be considered in light of its particular circumstances and merits.
In england-and-wales, if the officers were executing an invalid warrant - and importantly had no other legal power of entry - they (on the information provided) would be not be "acting in the execution of their duty" so would be trespassing.
Some relevant case law is Khan 2008 and Cheeseman 2017. The latter is a "Householder Case" that uses (unsuccessfully) the defence under s.76 of the Criminal Justice and Immigration Act 2008.
In Khan the police used s.18 PACE (a non-warranted power of entry and search) without meeting the statutory requirements and were duly sued in civil court for trespass - Khan was awarded £1,250 in damages.
Cheeseman was convicted of wounding with intent to do grievous bodily harm (but acquitted of attempted murder) of a trespasser after failing in his claim that he acted self-defence.