For years I couldn't recognize when I was starting to get frustrated and kept pushing until it was too much to bear.
What I've found works better for me is identifying when things are barely starting to get ugly and calm myself. I tell myself that this suffering is temporary and remind myself I've been able to solve pretty much any problem I've faced.