Triumph over disaster, hope springs eternal, never say die, the worm turns - they're all good themes to use for a novel. However, there is an inherent problem. A depressed main character can be, well, depressing to read. Once they're on the road to recovery their lives will be more fun to read about, but those beginning pages when it's established just how miserable/sad/downbeat their lives are can be miserable/sad/downbeat for the reader too. And that means the reader may never get to p 25 when it all picks up.
There are three solutions, and ideally you'd apply all at the same time.
One is to make the character self-aware. If your character lacks self confidence, then make them aware of that. Let them acknowledge how pathetic they're being, let us see them struggle to try to get out of the mire. If their well meaning friend suggests something, then don't have the character immediately stamp on the idea (it'll never work, I can't do that because...). Have them think about it in a positive way before being knocked back.
The second solution is for them to have some area of positivity in their lives. Yes, everything else in their life may have crumbled but their painting, garden, wood-working, whatever is still a source of pleasure and consolation. Make them skilled, knowledgeable or gifted in some way and show that there is some positivity in their life.
Thirdly, let them display positive qualities outside their depression. Just because the character's situation is sad, it doesn't exempt them from humanity. Actually the opposite applies - we may pay lip service about being nice to the sad and depressed, but not many of us actively go our of our way to spend time with them unless they are our nearest and dearest (and let's face it, we might well be staying with them out of duty rather than pleasure). So while the character may be sad, let them also be resourceful or ingenious. Let them be generous to others. Let them be loyal, brave and kind. Best of all, let them be funny...
Positive people planning with purpose is my motto, so while your character may be depressed work hard to make them depressed in positive way. Put bluntly, no one wants to read about someone who is moaning. So don't let them.