I accidentally told my best friend's secret to a mutual friend
You must feel awful about it!  What are you going to do?  Are you telling your friend?
I do! It just sort of...slipped out. I feel obligated to tell my friend I did it because it would be even worse if it came back to bite me later
Yes I believe it is better.  I hope your friend understand.