That was a very unhelpful comment from the school support worker! She doesn't sound very good at your job.Is there anyone else there who would understand better that you could talk to?
Your daughter sounds like she is really struggling emotionally and behaviourally, possibly due to circumstances or poor mental health, or possibly due to a condition like you say.
Whatever the cause, she needs help!
When she is upset, draw her close don't push her away and ignore her cries for help and love.If you can't do that straight away (cause I know its bloody hard when we feel angry!) Take some time out and return to her when you feel you can speak to her with compassion and not anger.
Are you on your own with her? I can't imagine how hard that must be if so.
Please go and speak to your doctor, and also perhaps speak to the school nurse?
You really need to get her some help, and perhaps if you feel low you might need some help yourself too? Your DD will feed off your own emotions and mirror these.
You have done well in recognising that its a problem that you nearly smacked her, and taking responsibility for your actions.You are not a shit mum, because you have reflected on all that and don't want to hurt her.
Just please see this episode as a 'warning sign' that you need to make some changes for you and your little girl.
Wishing you lots of luck xx