bro, positive vibes to you and all her relatives and friends at the moment.
There's not a lot to say really, but d you know in what context you were mentioned, because if it was in a positive light then you have to take what she wrote and use it as a strength in your life, you were obviously good to her and she clearly meant a lot to you. The wounds are fresh and you're in shock/disbelief now, that's nothing unusual, and you will ask yourself so many times could I have helped or prevented it, but in truth, you couldn't have done anything and it is not on your shoulders so don't put blame upon yourself bro, I had a similar thing happen and it affected me bad but it smashed my friend, turned him crazy with guilt and he is a broken man now, and he couldn't have done a thing. So please just keep positive and focused i know it's hard right now, but it'll get easier with time, and be open, express your hurt, and cry but most of all, talk about it.
Suicide is had, it leaves so many questions, but unfortunately you are not a superhero and you did everything you could. If you were close to her family, then talk with them too, they are going to be putting a lot of blame on themselves and you will be able t support eachother.
As for you girls situation, if she told you, it shows you that she trusts you enough to tell you, I'm assuming she told you...
But the trust thing is something you should be so grateful for, and again, use it as a strength, it didn't affect your relationship before and most likely shouldn't in anyway affect it now, she is exactly who she was before. The past sucks and lead us all to what we are now, you have to accept this and be thankful for what you have and who you are now.
Plus vibes again bro, keep strong and be open.
Feel free to message me if you want to vent some stuff bro, it's all good with me.
Peace, bless and R.I.P