Daughter told me something no parent wants to hear

Hi, 41/f me sitting in the living room tonight thinking everything in life is alright! In walks daughter 12/f, who wants to sit in recliner with me. So I scooch over and she climbs beside me, then very abruptly tells me how she wants to un alive herself because of school! 😧 excuse me ma’am what? She’s had this girl in her journalism class who is not being nice a girl she thought was her friend! Besides telling her that we would all miss her and she would break my heart if that happened. I felt a real sense of apathy from her! Like literally she didn’t care what I thought even seeing me crying! Idk what to do my brain is blank I need help……

Edit: I wrote this two minutes after she went in her room for the night! My head was everywhere so please don't think I'm all about myself for saying “ even after seeing me crying” or “ that it would break my heart “ I didn't literally say either of those things to her I mainly listenes and told her that I would get her help and that we would make it okay together and she's never alone ever ill never leave her! Just wanted to clarify those things

Edit 2: This morning she woke up smiling so that’s a plus! She has a doctor appointment this afternoon! No school today cause until I get her classes fixed she won’t have to endure another day sitting in class with her ex friend! So today she’s at work with mom until it’s time to go to the doctor! Thank you all for your helpful advice! I appreciate everyone one of you even the ones that aren’t so nice you guys keep me humble! I’ll edit again when we get a plan! Cause if her story can help someone else’s child then so be it