✔ 最佳答案
The first sentence refers to something happened in the past.
Say, Mary's mum passed away one year ago and she didn't tell Peter, so he didn't pay his last tribute to her mum. When he finally knew it and blamed Mary, Mary may say "the first sentence". That means she should have told him earlier, but she didn't.
The second sentence refers to something at the moment.
I'm sorry to tell you ... ( I'm going to tell you something.)
I'm sorry not to tell you.. (Something relates to present moment.)
Hope you can understand : )