I try to notice before my frustration escalates beyond the point of no return. If I do catch it early, I stop whatever I'm doing and go through a mental checklist of things I forget to do like pee, drink water, eat, etc. If I've done all that, I go outside or at least stare out of a window. If I still feel frustrated, I go for a walk and look for some newts in the creek by my house.
I started making videos of the newts and other stuff around as a hobby and that has helped a lot. So when I get frustrated at work, I can just stop for a while and do some newt stuff and I guess because I get likes and followers and shit, the dopamine is there and I feel "accomplished" so it's not like I wasted my time by not doing my actual job.
When I get frustrated unpredictably, like I can't possibly see it coming, I still try to follow the same technique, but it's wayyy more difficult to think clearly once I'm frazzled or whatever. Like I get in a loop of angrily repeating some phrase and I'll end up hitting myself, screaming, etc.
I'm almost 40 and only found out about the autism+ a few years ago. I sometimes wonder how much easier life would be if I learned some of this as a kid and my parents weren't fucking psychopaths who hid my diagnosis from me. I also work from home and don't have to keep exact hours, so it's a lot easier for me to mold my life around meltdowns
Edit: I'm also married to a fellow autistic person and we lean on each other a lot. Codependent af
Right down to calling themselves libertarians, a historically leftist ideology that now apparently means you're just too embarrassed to call yourself a republican