Hi there,
Please don't worry too much. If what you've said is correct, then you have a credible and complete defence to the offence.
If you are able to present evidence (there's is only a slight burden on you to provide something - evidence of a previous call to the police, for example) that your conduct was justifiable then the prosecution must DISPROVE beyond reasonable doubt that the conduct was NOT justifiable. If they can't do this, they have failed to prove an essential element of the offence (that it was unlawful) and you are entitled to an acquittal. (The legal authority for this is Beckford v R)
I would suggest you get in touch with a solicitor who will contact a barrister to present the case at the trial. If you have any other questions, I'll try and help.
Best wishes.