As someone who's grandmother suffered w/ mental illness and ex-fiancee also suffer w/ the disease, there are little options. But one of your options is to take legal action. If your daughter is really a harm to herself, you can obtain her medical/mental health records (as she is still 17 and is a minor in most states and has not been emancipated). You will need to fill out HIPAA releases to get her records. But after doing so, take them to a professional shrink and have her evaluated. If they deem her a danger to herself and/or others, you are able to take legal action to have her found incompetent. At which point you have control over her and her actions. Ultimately you will have to have her committed and then do your best to maintain her med routine should she ever be released.
My grams was committed and lived in a home for mentally ill patients. The reason being that she could not live on her own otherwise she would stop taking her meds and would try to harm others.
There is NO happy ending to your story. If your daughter does have mental health issues, this is a life long struggle and you have to be the strong one to be able to make the appropriate decisions for her. My mother committed my grams and she still feels guilty about it to this day and my grams has been dead for a while.
My heart goes out to you and your family. You should also look into getting mental health assistance for your own stress and struggles. There are support groups out there.
Much love and peace to you and your family.
L_G