If this is how you react whenever you hit a roadblock, you may seriously want to reconsider whether software development is the right career for you. Like, honestly, I'm not being facetious; the vast majority of software development is maintaining old code, not writing new code, and you'll constantly be faced with tough challenges that require patience and a clear, coherent thought process to think through the solution. Beyond entry level positions, you won't find clear repeatable solutions to the kinds of problems you'll face. Everything gets messy and nuanced, and you need to learn to work with poor documentation and frustrating tools and still find a satisfying and creative way to apply it to your situation.
If you're not capable of calming yourself down enough to work through a relatively basic problem, you're just not going to enjoy this profession very much.