を忘れてしまって

having forgotten [something], unfortunately

→ を
phrase Uncommon #14,103
having forgotten [something], unfortunately This is the particle を plus 忘れる (“to forget”) in the て-form with しまう. It connects to what follows and often conveys regret, apology, or that the forgetting was unintended. The object before を can be replaced with another noun.
JA: 彼の名前を忘れてしまって、思い出せません。
EN: I’ve forgotten his name, so I can’t remember it.

宿題を忘れてしまってすみませんでした

I’m sorry I forgot my homework.

ええ届いたのをお知らせするのを忘れてしまってすみません

Yes, I'm sorry I forgot to let you know that it arrived.

彼女は私に会ったことを忘れてしまっている

She has forgotten that she ever met me.

現実を忘れてしまって怠惰なだけだ

I’ve simply lost touch with reality and become lazy.

— 惑星ソラリス (1972)