Sometimes in research, it is easy to get angry when things go wrong and trust me they go wrong a lot! However, maybe this is not the right way to think about things. Anger is a typical response to annoyance and when things don’t go to plan it certainly can be annoying but does anger ever really help?
Perhaps, instead of being angry that an experiment didn’t work properly, or there is a bug in your code, it would be better to question why it annoyed you? If it was because you did something wrong, then learn from that mistake and do it differently next time. If it was because the system behaved in a way you didn’t expect then why not investigate further? Perhaps what started out as an annoyance could be your biggest breakthrough