No matter what, if you learn from your experience, you'll come out ahead. Be sure to acknowledge to yourself what you learn from each experience and also be sure to acknowledge everything you did that was good, positive, constructive or helpful to yourself or others. It's important to do that. You're only one human being. You can only do what you can do - you can't do more than that.
Events usually have a life of their own - beyond our control.
Try to plan as best you can - but you can't plan for everything. Unexpected things do happen. It's not your fault. No one's got it as bad as I do, etc. For that kind of issue - you need all the help you can get.