That's a very Buddhist way of thinking. It also helps to think this way when something bad happens to you. No matter what happens to you, it's because of choices you have made. Just accept that fact and don't blame others. If you can prevent the same thing from happening in the future, then make the choice to do so. But don't worry about what has already happened because it'll never change.