I can only talk from the point of view of the English system, not the US healthcare system.
There's a few questions that will help clarify what happens to this girl.
1. Are you talking before or after the court proceedings?
Anyone who commits murder will first off go into police custody. If they need psychiatric help then there are a few things that might happen.
a. A psychiatrist or CPN (community psychiatric nurse) working for the court laison service gets asked to see her in the police custody cell. They may suggest the girl is admitted to hospital for help. The hospital would almost certainly be a regional secure unit where she would be behind locked doors. They can only suggest though, not enforce this, but in reality the police are very unlikely to say no as typically this doesn't get recomended all that often.
b. She winds up on remand and may get access to a psychiatrist visiting her prison / centre. She may recieve treatment there or they could recomend transfer to hospital.
c. She slips through the cracks and gets nothing.
After a court hearing.
a. The court may want a report on her mental state and her fitness to plead that may delay the trial. that might be done in prison or in hospital.
b. The court may hear the case and sentence her normally....where she might again see a psychiatrist at her prison.
c. UK courts have the ability to send someone to a psychiatric hospital, either as their sentence, leaving the discharge entirely in the hands of her doctors, or with the intention of her receiving whatever help she needs before transfer back to prison. Once again, she'd be going to either a medium or high secure hospital.
2. Once she's in hospital, is she there because she's a risk to herself, or because she's undergoing an assessment to see if she's a risk to others?
Different things will happen depending on which of these is the case.
If she's there because someone in the police or court system thinks she's an immediate risk of suicide, then the team will treat whatever might need treating. They'll listen to her, probably offer some cognitive behavioural therapy to help her come to terms with what's happened and try to treat her PTSD or depression if she has them. Medication may be a part of that, but she won't be allowed to choose to remain medicated, she'll be offered medication if the doctors think she needs it, or possibly made to have it if she's on a section 3 and they think she needs it but won't take it.
If she's in hospital because she's a risk to herself, or unfit to plead, then she'll probably stay there until the doctors think she's ready to be handed back to the courts, then they'll hold the trial.
If this is a hospital admission to assess if she's a risk to others then she'll almost certainly have already been to court and the court will have decided that she needs treatment rather than punishment and detained her to hospital. The team treating her will have the task of treating whatever is wrong and also making a decision on if or when she will be discharged from her section and allowed home. They'll discharge her home with the permission of the home secretary (probably) when they feel she's ready and no risk.
If the court decides that the appropriate sentance is prison, but she also needs help for her mental state then she'll recieve a prison sentence and be transferred to hospital for treatment (probably straight from the court). Once the doctors tell the court they have finished, she goes back to prison to complete her sentence.
3. Treatment.
In the very short term, if the girl is VERY distressed she may get short term sedation with something like diazepam. Short term means only a couple of days probably until she settles enough to talk to. Sleeping tablets are a real possibility in the short term too.
If she's experiencing either depression or PTSD then the most likely medication would be an antidepressant, such as prozac.
The real treatment would be cognitive behavioural therapy but done in a slow and sympathetic way to allow her plenty of time to talk about what happened. The idea would be to allow her to question any thoughts she had that she was stuck with, and help her look at them from another point of view. If she was experiencing lots of nightmares and couldn't talk about what had happened then EMDR (eye movement desensitisation) can be pretty helpful.
A hospital ought to have access to all of these. A prison or remand centre would probably have none and medication would be all she'd get.
Hope this helps.
Craig