How do I help a person who is having problems with BPD?

A close friend of mines is really suffering at the moment, they are finding it impossible to get the help that they need and are being constantly let down by the services that are supposed to help them. I try to be there for them as much as I can but I always feel like I do the wrong thing then it’s too late by the time I have realised it. When someone is having an episode, what is the best thing to do? What should I say? 

How can I reassure someone that I am there to help them and just want the best for them? I have let it go on too long, i should have sought advice long before this. I really just want to be able to support them because they are not getting help anywhere else. I just want to know what the best things to do or say are to help them come back from the brink.