I think first of all you have to make your top priority feeling ok. If that means quitting your job, then you’ll have to quit. But then obviously you might have other problems if you do that, like not having enough money. So maybe try and get another, less-stressful, job first and then quit your present one. If you want to become a developer as your next job, that might take time so you’ll maybe need to acquire strategies for dealing with the stress from your present job before you become a developer.
I don’t know what your job is, but I’ve had very stressful jobs in the past and I know it can get on top of you if you aren’t careful.
Sometimes you can get too focused on your job and start judging yourself in terms of how successful you are in your job. That can cause a lot of stress if you have a bad day. You can get round that by developing an outside interest and become good at that so you can base your self image on that and not just on how well you do at your job. I used to do that.
Another trick I learned for dealing with stress, which works very well for me, is controlling your body language. When people get stressed, they move, talk, sit etc. in ways that express their stress, but also reinforce it. You can see this by doing the following: sit at a table with your elbows on it, interlock your fingers and raise your forearms to verticle, like this: http://l7.alamy.com/zooms/84347eee3d8046d5817e96a7f815db6e/two-hands-interlocked-together-in-studio-ba50nw.jpg
That’s a stress position. You should be able to detect a slight feeling of stress coming over you when you do that.
Next try a none stress position to see the difference, try this position: http://sonamics.com/wp-content/forum/uploads/2013/09/bl19-300x300.png
Now if you notice the difference between how stressed you feel in those two different positions, you can see that your body’s position affects your stress level. So, to control your stress, a strategy you can use, when you are in a stressful environment, is to consciously move, sit, walk, speak, etc. in ways that you would if you were feeling relaxed. What should happen is that you body language will be telling your brain that you’re relaxed and you’ll start to feel less stressed as a result. I used to work in a place where, at certain times of the year, people would get stressed to hell and be running around like loonies having fights with each other and shouting and stuff. It never used to affect me at all, I’d be walking round as if I was on holiday and never in a rush. The only down side is people think you don’t give a damn about your job, so you end up having to explain it to them.
Hope this helps in some way.