The first defense at avoiding frustration is to avoid putting yourself in the situation that can cause frustration.
The second defense, when you cannot avoid it, is to recognize that the situation is likely to become frustrating, so anticipate it and celebrate your foresight.