I would try
convincing her by telling that the mistake may not be from the teacher. She may have gone wrong somewhere due to which she would have lost marks.
But there is nothing to worry there will be more tests in future in
which with extra hardwork she can improve her results. I would try to
calm her down and ask the teacher for apologize for her mistake. If
she doesn't have the courage to tell her she can write an apology letter and
give it to her.