What would happen if my partner suddenly left me or, god forbid, something bad happens leaving me alone?

I'd have spent a good amount of time being at home and not working, so it would be hard to get into the corporate world again. So how do I fend for and look out for myself in the event of something bad happening?

Edit: I'm not currently in a relationship or looking to be. I'm seriously considering the SAHW life, and posting my worries on here. So thankful to have this community of wonderful ladies helping me!