I suggest that you restart your studies. It is NEVER late to study. This will enable you to focus your energy elsewhere. In particular, now, more than ever before, people go for post-graduate studies at all ages. I do not know what it will take to restart your M-Tech, if you need to give a new entrance or not. But give it a shot.
Also, advanced degree will help you advance your career. In the event you decide to get divorced or even otherwise, it will be a good asset to have. You are still young (from your descripttion of things) so focus on the good-things-that-can-happen. If you switch your focus to education for the time been, your domestic problems may also get solved. Just put them in the background and they will take care of themselves. Focus on the family problems only and you will get eaten by them, day-and-night.
If you find yourself out of touch with tech, you can pursue an MBA or even LLB! Do pursue something... GOOD LUCK!!!