It might be helpful to catalog a few reasons why software engineering can be so stressful. Many of these are common to other professions as well, to varying degrees.
* It's hard to predict how long something will take so you stress out when you take longer. Even if requirements are clear, all sorts of things can delay implementation: debugging, build issues, plugging in dependencies, bugs in underlying libraries. All these can take a limitless amount of time.
* Complexity can be overwhelming. Staring at a thousand line, convoluted class can make you shut down, just because it's too much.
* Being new and not able to produce at the same level as others. This one hopefully goes away after some time as you ramp up, but you might be new at different projects in the same team.
* Changing requirements, increasing scope.
* Priority inversion - you depend on another team for your work, but they aren't working on it, and you have to answer for that.
* Having to give an update at a status meeting when you know you haven't made as much progress as you'd like.
* Feeling bad about your productivity, so you don't take care of yourself (wasting time at night), are tired, and aren't able to be productive the next day. This whole loop can last for a long time if you can't break it.
* You can't ask for help because you feel like others will think you're stupid for asking those questions. And you can't make progress bc you really need to know those things.
Many of these things are exacerbated by life circumstance, social position, personality, previous mental health history, and management/peers. The way you can improve this stuff for yourself is by having a solid wellness routine (exercise, sleep, diet), good communication with your peers/manager (this is a chicken/egg situation), and pushing for reasonable organizational changes. Of these, only wellness is totally under your control. The others require people around you to change, which may not be possible.
* It's hard to predict how long something will take so you stress out when you take longer. Even if requirements are clear, all sorts of things can delay implementation: debugging, build issues, plugging in dependencies, bugs in underlying libraries. All these can take a limitless amount of time.
* Complexity can be overwhelming. Staring at a thousand line, convoluted class can make you shut down, just because it's too much.
* Being new and not able to produce at the same level as others. This one hopefully goes away after some time as you ramp up, but you might be new at different projects in the same team.
* Changing requirements, increasing scope.
* Priority inversion - you depend on another team for your work, but they aren't working on it, and you have to answer for that.
* Having to give an update at a status meeting when you know you haven't made as much progress as you'd like.
* Feeling bad about your productivity, so you don't take care of yourself (wasting time at night), are tired, and aren't able to be productive the next day. This whole loop can last for a long time if you can't break it.
* You can't ask for help because you feel like others will think you're stupid for asking those questions. And you can't make progress bc you really need to know those things.
Many of these things are exacerbated by life circumstance, social position, personality, previous mental health history, and management/peers. The way you can improve this stuff for yourself is by having a solid wellness routine (exercise, sleep, diet), good communication with your peers/manager (this is a chicken/egg situation), and pushing for reasonable organizational changes. Of these, only wellness is totally under your control. The others require people around you to change, which may not be possible.