Rather than tell her that everything happens for a reason, I would share with her that in times like this, we need to draw near to God. We all know crummy things happen, we all hopefully know God is in charge of it all, etc. I think it will be more comforting if you point her to a closer walk with Jesus, where she can find true comfort and peace.
See scriptures below:
Psalms 37:23 The steps of the godly are directed by the LORD.
He delights in every detail of their lives. NLT
John 16:33 These things I have spoken to you, that in Me you may have peace. In the world you will have tribulation; but be of good cheer, I have overcome the world." NKJV
Prov 3:5-6 Trust in the LORD with all your heart, And lean not on your own understanding; 6 In all your ways acknowledge Him,
And He shall direct your paths. NKJV
Col 3:15 Let the peace of Christ rule in your hearts NIV
Phillipians 4:6-9 Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made known to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus. Finally, brethren, whatever things are true, whatever things are noble, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report, if there is any virtue and if there is anything praiseworthy meditate on these things. The things which you learned and received and heard and saw in me, these do, and the God of peace will be with you. NKJV
Heb 13:5-6 ...for he hath said, I will never leave thee, nor forsake thee. So that we may boldly say, The Lord is my helper, and I will not fear... KJV
Rom 8:28 And we know that in all things God works for the good of those who love him, who have been called according to his purpose. NIV
Let me know if I can help any further...