The sentence exactly means "Lately, I've been really hungry, so I can't have helped but eat sweets."
If you insert slashes into the sentence, you can do like this: "最近|ものすごくお腹が減ってしまって|ついお菓子を食べたりしてしまいます。"