In my experience it’s better to be gentle with yourself than to blame yourself for things that happen to you.
That’s not to say that you should ignore your role in events or refuse to accept responsibility. Nor should you simply blame others or the universe for things that happen to you.
You can take a more objective perspective.
You act in the world according to the current state of your personal universe, which defines your understanding of the world. If you acted in a way that created harm to yourself or others, then rather than blaming yourself, you can examine your personal universe.
You can ask what assumptions or hypotheses led you to taking the action in question. Then you can make adjustments that change the state of your personal universe and make similar events less likely to happen again. In other words, you can learn from your mistakes.
Bad outcomes can be treated simply as challenges to your personal universe.
Blaming yourself stops growth. Don’t waste your time with it.