having forgotten [something], unfortunatelyThis 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.