When you encounter an unpleasant or undesirable situation, take time to reflect on it afterwards. Think about what you could change, to change the outcome next time, to get a better outcome. Make a mental note of it and change your actions, behavior accordingly. This has served me well. Give it a try.
You are not changing yourself for others, you are making adjustments so that you can have a better life, better situation than what you encountered before.
We have little control over externalities, and we can't change others. The best we can do is change ourselves. After all, if we can't change ourselves, how can we change others?!
Changing ourselves is not only the only option we have, it is also the best option.
Don't go into the thought process of "could have", "should have", "would have". This is not about that, this is not about self pity. Instead, take a look at yourself. Reflect. Learn. Repeat.
Your life will be progressively better.