Ok.... There are two things that come to mind. First how to de-escalate his heightened emotional state - the main thing situations such as this is to get him to take his focus off the problem.
How do yo do that? You get him to focus on something else. Here is what has worked for me....
1. Stay Calm (I mean you stay calm)
2. Gently and confidently get him to focus on you eyes - tell him to look into your eyes.
3. Tell him to take slow deep breaths - in through the nose and out through the mouth.
4. Use a calm, confident voice no matter how escalated he is.
5. Get agreement - what I mean by this is, if he says, "There is an ant!" or, "Ant, ant, ant..." ask him if he wants the ant to be gone (agreement). He will say yes or affirm in some way and you say the following, "First quiet voice and quiet hands then I get rid of the ant".
Of course this will take some practice and it won't be great the first time, but it will get better over time.
Now here is the second and very important issue... when things are calm and there are no ants around, you want to start some cognitive behavioral techniques to get him over his fear of ants. This will take effort and time, but it will work. You may want to get a therapist involved if possible, but basically it goes like this.....
Very gently have conversations with him about ants. Teach him about them at a very slow pace. Introduce him to pictures of ants, then toy ants, and so on. The goal is to introduce him to live ants so he can overcome his fear.
Given that he has mild autism, he sees the world in a very literal sense. Right now he sees ants and remembers that bad experience. With time and effort you can shape his thoughts to see them as interesting bugs that we need not be terrified of.
As I mentioned before, I work with kids this age (from 3 to 13 actually) with the challenges you son faces so I know you have your work cut out for you. But I also know that with time and effort, great progress can be realized.
I will just finish by saying that you did
the right thing to reach out to me here at Just Answer. You would be well advised to continue to reach out to professionals as well as family and friends for help. In many places there are organizations that provide guidance and support for parents in your situation. Your child's school should have information about this organizations or many communities have help lines like 211 which can provide information.
I hope I've answered your question and I wish you much success. Please let me know how it goes and if I can be of further assistance, please reach out to me here at Just Answer.