This might appear obvious but when people really feel under stress the "trip or shock" response kicks in and also this makes them much less able to think reasonably. If you feel you are coming to be agitated after that ask if you can take a quick break to aid you really feel calmer. Some deep breathing, or other relaxation techniques, can be helpful.