I am sorry that you lost your mum, and I am sure that your DD went through a difficult time because of it. I can understand why she may have fallen behind a little on school work at this time.
What I don't understand is why it only seems to be an issue in Spanish.
Sorry, but unless there is a genuine, medical reason that your DD cannot do her homework, she does NOT have any right not to do it. Imagine what the other pupils think of this? Homework is not an optional part of high school, and no teacher can just let it go, or everyone will stop doing it. Your daughter is not a special case.
If she is unable to complete homework, I'm sure the class teacher would give her extra tuition at lunch, break or after school to help her catch up.
The teacher shouldn't make comments about your DD being miserable, but you do need to make sure that the school know anything that she is going through, and that this teacher is briefed. She isn't a mind reader.
If your daughter can't do what is necessary in class, she shouldn't be in mainstream class. That's not a criticism, it's just that there's no way she's getting the most out of her class if she isn't doing it properly.
Telling her that homework is her choice isn't the best example to set.
You say that this teacher is damaging her mental health. If this is true, and not just dramatic, you need to take her to her GP and have her mental health assessed. That would probably help in school too if you had a diagnosis to work with.
I might have read it wrong, but you sort of sound like one of those parents who gets angry when a teacher (who is in charge of your child during their lesson) tells your child what to do, and you automatically assume that your child is an angel, or that they behave in every single class. Even the best kids sometimes play up in a certain class - for goodness knows what reason.