ignore your ex completely and do not associate with him at all (i.e. go to his house, job or any relatives in common) - even if he approaches you, say nothing and walk away. report all the threatening behaviour to the police as it happens - but calm down before doing it, get home or somewhere safe and ring them every time. easier said than done, but you then know that you are doing the right thing - petty 'face-offs' or running round to his every time something happens is juvenile, and it will get you and your hubby into trouble if you keep doing it - DO NOT go near him under any circumstances.
as for the criminal damage, if you saw the window smash, admit it and you will get a slap on the wrist.....if you didn't, state you are not guilty and you will get a slap on the wrist (all you will get is a small fine or a conditional discharge - which means you have to behave yourself for a certain amount of time.....usually 6-12 months). nothing bad is going to happen to you and your ex is basically winding you up as i think he knows this will get to you. please stop worrying or you will make yourself unwell again.
certainly speak to your care co-ordinator/wellbeing team about what has happened and how it has made you feel for some support and plan help if things start getting too much. they will not intervene in the court process for such a petty offence (i am a psych nurse and only people who have committed serious crime get assessed by mental health professionals - not for criminal damage), i suspect, but will be concerned with keeping you well instead.
i also have mental health problems and can certainly see why you are upset and angry at your ex, but you cannot let this incident overshadow your whole life - it will only make you unwell and maybe this is w3hat your ex wants. take your meds, get some sleep at night (chemically induced if necessary!) and carry on with all the other things that occupy your life - housework, your job, entertaining the kids in the holidays, shopping etc. that is what is important, not your ex. let him whinge and moan and behave like a child. it is very unlikely that he will hurt you, or do anything that leaves any kind of firm evidence - i think he is a wind-up merchant and you and your hubby are falling for it!
leave him alone, report every threat/harrassment you can to the police, deal with the criminal damage charge (it is a minor offence and nowt will happen) and get on with YOUR life. sod his x