[Not a teacher]
Sorry to + Infinitive / Sorry for + Gerund can be used for the same purpose, with a nuance of usage in some contexts
"Sorry to inform you that ..." could be used before - in this case - providing the information to you.
"Sorry for informing you that..." coud be used after the action expressed by the verb has been already completed.
In some contexts both would be natural, but the second option is the correct form if you want to apologise or explain yourself afterwards.
Student or Learner