It sounds like you are suffering from imposter syndrome. Definitely look it up if you haven't heard of it as it is extremely common among engineers and developers.
Find someone that knows you to talk about this. It's very hard to give specific advice with out knowing your personality or the full story.
Try and remember that your life is much more than your work. There are so many other things worth living for.