Does it matter what she has? She clearly has mental health issues and these need to be treated, but unless she agrees to this little can be done.
The best thing for you to do, you are already doing as are her PiL and that is kto keep your distance, while trying to support your DGD.
She is now 13 and close to being able to lead her life independently from her mother. She presumably has a phone so that you can text her and mail her and offer all the support you can, and she can make decisions as the whether she would like to visit you or not. Have you discussed the issue with your SiL and got his take on it.
By the way, whatever her problems it is unlikely to be Bi-polar. Because the name describes the problem. Sufferers swing between the poles of episodes of manic activity and periods of inactivity and depression and, I think, periods of normality. This does not sound remotely like your daughter's problem.