Thing is, it's easy for someone who has a genuine health issue (and we have no reason to doublt that Katie Hopkins' epilepsy is a genuine health issue) to blame everything they do on it. Sometimes, it might even be true...but that does not excuse it.
Unless the health issue is manifesting as a compulsion to get her vitriol published in the mainstream media and be prepared to be interviewed at every turn in order to vent that vitriol further, she has some agency. Let's face it, if she's got the mental capacity to recognise the possible impact on her of brain surgery, I cannot see how she can lack the capacity to recognise the harm her words do.
I don't know if she is actually using her epilepsy as an excuse for what she writes, but if she is, then she goes down even further in my estimation.
In the meantime, I don't think there is anything wrong with having views on that writing, no matter what other trials she might be enduring. Some people, after all, go through the most terrible things and it doesn't make them into hate-filled monsters. To some extent, there is some choice being exercised, and if she chooses to write that stuff and get it published, then she deserves to be held to account for that choice.
It doesn't mean nobody would wish her well in her surgery.