I'm sorry you're getting such a bashing op but I don't think the teacher was in the wrong,
My dd has ASD and there have been times when I've been in this situation with her, where she's been hysterical sobbing boardering on meltdown and I've had to leave so I know how awful it is, it upsets your whole day.
I think perhaps the teacher walked past initially because she didn't want to take over if you were already talking to dd and overwhelm her with more faces when she was upset.
Also when you did shout her back for help and she didn't give the reaction you expect I think this could be because she had a career of dealing with children crying to go home and she might think the best approach 'getting on with it' like a nursery would do, drop and run type situation rather than you, and the teacher getting involved and escalating your daughters stress.
Be honest how long would it have taken your dd to calm down if the teacher stood with her and you left?
For my dd it could have easily, easily been 30 minutes and it would be really irresponsible for the teacher to leave the class for that long.
As cruel as it sounds it's probably best that she acted the way she did so that the situation wasn't becoming a bigger 'monster' to her by both of you consoling her you're validating that this is a scary situation and that might make it even worse for her.
But I do know how hard it is so I know that you just wanted someone to help make it better and no one did but I don't think anyone could have really without leaving a class of students unattended.
Have you tried looking at PECS cards and communication cards for your daughter they might be really helpful with getting to school.
If you've not heard of them it's basically a card you stick you dad's activities to do she knows where she's up to andbyou take each card off as the activity is completed.
So for example say on Monday if she had IT, then break, then maths, then lunch, then English then home you would start your activity card as soon as she got up by sticking
Have a wash and get dressed cards on the board, then a walk to school card, then a say bye to mum card, then cards to show her exactly what she will be doing that day. She can peel them off after each activity is completed and then she knows exactly where she is up to and when you will be picking her up again.
Just google autism activity board, PECS cards, there are sellers on eBay who custom make for you,
I know it might sound silly but it worked wonders with getting my dd in a routine of going to school, I think her fear was the I dropped her and the day seemed so long she couldn't appreciate when it would be over and she could come home and this way she knew and felt more in control going to school.
It might work it might not but it might just be worth a try. If you don't want to buy a board and cards write it on a list she can keep with and tick.
Children with ASD disorders often benefit from a more visual instruction. (Not generalising based on my dd I used to work at a SN school)
You could also go to whoever is in charge of pastoral care at school if you have someone I think most schools have someone to see if they can help.
Sorry for epic post