Sometimes it means that but not to physically hurt, but to emotional hurt as in telling your girlfriend/boyfriend or partner that you want to leave them.
The phrase is used in all situations when you want to or have to inform someone of bad news.
Sometimes it is used to inform a person that you are not doing something or that you are doing something.
I hate to break it to you but I want to quit this job.
I hate to break it to you but I will be on holiday that day, I can't come to your party.
I hate to break it to you I'm leaving you for another woman.
I hate to break it to you but I want I got the promotion you were hoping for.
I hate to break it to you + any bad news or something that will disappoint the other person.
It can also be used humorously or used to add some humour before the bad news.
See this question and answer from the internet
What exactly does 'hate to break it to you' mean here?
Hate to break it to you, but that's not how it works.
It's a line from the TV series The Office when Jim refuses to tell Pam when he's going to propose to her.
Have I not proposed to you yet?
Hmmm, I don't know...
Oh, well, that's coming...
Oh. Right now?!
No. Not gonna do it right here, that would be rather lame.
Okay, so then, when?
Pam, I'm not gonna tell you. Hate to break it to you, but that's not how it works.
"I hate to break it to you, but..." tends to occur in humorous or ironic contexts, where "I hate to break it to you, but" prepares the addressee for "bad news", but in fact precedes a trivial statement (e.g. "your zip is undone").