The most common way to show that you are sad for someone when something bad has happened is to use I’m (so) sorry. or I’m sorry to hear …
Diana told me about your brother’s accident. I’m so sorry.
I heard that Charlie had lost his job, Sara. I’m sorry.
I’m so sorry to hear that your mother died.
I was very sorry to hear that Julia and Marco had split up.
To show that you are sorry when something slightly bad or disappointing has happened, use It’s a shame … or It’s a pity …
It’s a shame you couldn’t come with us last night.
It’s a shame she didn’t pass her exam after all that hard work.
It’s a pity you can’t stay longer.
It’s a pity your mother won’t be there.
Other expressions of sympathy that you might want to use are:
I’m thinking of you.
Our thoughts are with you.
You have my deepest sympathy.
Come back for more blogs on using English in everyday situations: https://blog.collinsdictionary.com/language-learners/learning-english/
All opinions expressed on this blog are those of the individual writers, and do not necessarily reflect the opinions or policies of Collins, or its parent company, HarperCollins.