Yes, your current situation seems shitty. In essence, your world has fallen apart. Believe me, there are plenty of people here who have been through similar or worse.
Right now you can't see the forest for the trees. Things to do to get out of your current situation:
It really is that simple. When you get to #3, go back to #1 and start over.
More specifically - you have marketable skills that are in demand right now. Make use of the opportunity.
If you're in the middle of nowhere, your woman-options are going to be limited and you're likely to end up in a bad situation since right now you just want the companionship. Look for dev jobs in the big metro areas - SF, NY, Austin, Seattle, Portland. Those are all more expensive than where you're living now, but you really do need to reinvent yourself, and the best place to do it is in a big city.
Figure out how to spin your resume to highlight everything you've done for the last 10 years and turn it into an asset. You can get hired by someone.
Move and don't look back. Get a tiny cheap apartment and go out and explore your new world. Make friends, find hobbies, do things that you can't do in the middle of nowhere. This will keep you preoccupied, make you a more interesting person, and will necessarily put you in contact with women.
Don't get oneitis for the first girl who pays attention to you after this. You're particularly vulnerable to falling for a woman's charms right now and can be snapped up by one as she looks for a BB, especially once you get established. If you do that, then you'll be back here in 2021 with the same story.
One of the best things you can do to combat being sad and lonely is to make a plan and start executing.
Action is your friend right now.
Realize that your plan is not going to come together overnight. Make slow steady progress towards your goal and track it so that you can see that you're getting closer to escaping.