I'm 53 and have been working as a programmer since I was 17. I still love what I do but I've been where you are at several times. I'll tell you something you probably already know - it's impossible to make a good decision where you are at right now. For what it's worth I'd suggest taking a break and then deciding what to do once you have some distance and have shaken some of this off.