Ideas can come from nothing. Feelings can spring out of nowhere. Life is like that. You can never plan for everything. It is what you do in times of desolation that charts the recovery.
Remember the best you can do is the best you can do. You are enough. Believe in that. Be thankful for that. Take lessons from that. Things will only get better. Nothing always turns into something.