There are two very important words: reaction and response. Reaction is an emotional reaction to a situation. Response is doing something meaningful, doing something creative without reacting emotionally.
When you see the mistakes of other people, without being self-righteous sometimes you can say: I may not have made that mistake, but I may be making worse mistakes, having wrong thoughts in my mind. Then when you see wrongdoings you relate to human frailties in an entirely different way.
It is good to have a dialogue with such people and just get them to reflect on what is happening to them. This may work, this may not work. If it works it’s fine; and if it doesn’t work, you should be able to see such human frailties and just understand that this is the way things are. So I would like to emphasise the importance of getting the person to see what he or she is doing, to get that person to reflect as far as possible by asking questions, rather than imposing your opinion on other people.
And I would also like to suggest that in such situations, without being self-righteous, to honestly tell such persons: I’m sure I’m having shortcomings in me and I’m full of imperfections because I’m still not an enlightened person, but I’m curious to know what makes you do this? That can touch people very deeply rather than the self-righteous way.