Is AUTHOR wrong in the post ? POST : So this girl that I've been talking to online for three years now has recently told me that she has begun to cut her wrists because of things that have been happening in real life. After she told me about it, I instantly became very sympathetic towards her as purposely conflicting pain upon yourself is something that I do not approve of whatsoever.
These past couple of days, I have been talking to her about it and trying to get her to stop and to ensure that she doesn't do it again.

Getting to the joke, it happened about an two hours ago now where she told me she had got banned from a Discord server for calling all 'People who are of X nationality are all idiots' so I said in a joking manner, "I know an idiot, and she so happens to be X nationality too!" she did not like that and instantly told me to apologise which I did. Afterwards, I stated that other people I talk to are able to take small jokes like that so she said "Fuck off. Don't fucking compare me with anyone ever again" which I replied with a simple "Ok." and blocked her.

I can understand where she is coming from with the comparison, but I can honestly say it wasn't meant to be a comparison of "They can do this, so why can't you", I was simply just stating something. I can also see that because of the wrist cutting, she is in emotional (and physical) pain and maybe that joke was said at the wrong time but with her, there never really has been a right time as pretty much everything has to be serious otherwise I'd just get ignored for some time afterwards.

I don't want to be the person in the wrong here as I never like to make people unhappy and always try to diffuse things and keep people smiling if I can help it.

There have been previous accounts where I felt like I should no longer be talking to her anymore and I actually did completely stop talking for 6 months before shamefully going back.
If I am in the wrong, then I will unblock her and apologise once again and hopefully, she'll understand. But if not then I just don't know what else to do.