Any negative emotion is self-defeating but, of course, they happen. The key is to not allow them to dominate our thinking and to get past them as quickly as possible. We have to learn to learn from our mistakes and work on them during our practice time but in games, for sure, we have to think about the next pitch and not the last one.
Frustration is rarely going to be an emotion that will help you solve a problem. Here is an article that might help with any frustration you may experience from time to time.