"Talk with people, get support, and try to find a way out."
This is very good advice, but so rarely followed.
The problem is, most programmers are shy and reserved, and besides, they don't understand (or at least I didn't) that their problems aren't unique. That hundreds and thousands of programmers before them have faced this exact problem and survived. And not just survived, but thrived.
In the long term, it doesn't matter. But in the short term, it can feel like the world is ending.
Other people are going through the same thing, and it's normal to be unhappy with things at a bad place: it isn't your fault, and you deserve better. Talk with people, get support, and try to find a way out.