Personally, I have been there. I know how it feels, and the hopelessness of it all. My strategy wouldn't be to strait up try to convince them not to do it, but to just listen. Listen to anything they want to talk about, while keeping it oriented to them, not adding suggestions or ways of fixing things, the most beneficial thing I can do is to just listen. During this, I might add why the choice they may make is the wrong one, using arguments that are almost impossible to dismiss of refute, thinking carefully about what I am going to say, to avoid making things even worse.
Just being there, and understanding their stuggles is all I have the ability to do, goingg about trying to solve all their problems is harmful for they probably have already thought of your solution. Reason why their desition might be wrong, but do it right. This is what I would have needed when I was in situations like this.