I m not really sure about using participles in this specific usage.
I am sorry for leaving earlier.
I am sorry for having left earlier.
I used the first option when writing an email to my teacher describing I was not able to come to the meeting she arranged.But I have been doubting the second sentence too, cause I know it is also an option, so which one is better for this specific occassion.