To my friend
what you said is right in some point but 失礼します is a formal way to say sorry to bother 「邪魔して ごめん」.
It's difficult to explain... but I'll try to!
I think the difference between ごめん and 失礼します。/失礼いたします。 is in what situation you use the word.
失礼します is used usually when you are to bother someone. And you can say it however you are not very sorry, but you wanna try to be polite. Such as you are to talk to someone who seems to be doing something, to enter someone's room (cuz it's a little like invading someone's territory), and to leave someone behind(You are going to do a rude thing that you leave))
F.I.
1〇しつれいします。お電話がありました。Excuse me, There's a phone call. (interrupting your boss seems to have a look on papers)
2〇しつれいします。(being about to leave)
3〇しつれいします。(entering someone's room)
1×ごめんなさい。お電話がありました。(That sounds you are really sorry)
2、3×ごめんなさい。(we don't say ごめんなさい in this situation)
2,3△ごめんください。(OK but a little old fashioned)
And you use 失礼しました when you are afraid you might have interrupted someone or bothered someone(you also use this you have made a slight mistake. If you think you made a big mistake, you should say 申し訳ない(もうしわけない)or 申し訳ございません。instead )
ごめんorごめんなさい are most widely-used and used in a very similar way of the word, sorry.
申し訳ない is the best thesaurus of ごめんなさい which means only sorry.
Sorry I have just find that しつれいします is not a word for goodbye.
It's just a word when you want to leave politely lol.
OMG the content in this simbol<> is invisible:(