Perhaps even something as simple as just rubbing his back and giving him a hug, may calm him down enough for you to reason with him and to prevent things from escalating.However, I think you need a longer term solution that gets the root of the problem. Hopefully, more people with experience dealing with this will chime in.

If he can approach his "challenge" homework with a learning goal instead of a performance goal perhaps that will help. You can even state this objective for him and see if it helps. Here is an article that discusses it https://alumni.stanford.edu/get/page/magazine/article/?article_id=32124

I prefer to use this terminology instead of "fixed" versus "growth" mindset with kids.