My son is 11 and he has never had to be hospitalized, but he definitely struggles with anxiety and depression. He has so many social struggles, knows he is different, but wants so badly to fit in. But he never seems to get it quite right and often is left out. He also is immature for his age (developmentally delayed is the appropriate term), and as all the kids around him are moving into tween/adolescence, he is still very much a boy who likes to play with toys and be silly. I don't know what it is specifically that your daughter has struggled with, but I want you to know you are not alone. It can be heartbreaking to watch your child struggle so much and not know what to do to help.
I am sorry I don't have an answer about the hospital situation.