I wanted to help, but there was nothing I could do.

Literal

Help-[for someone-てやりたい][quotative-とは] think [but-が], self [with-では] how-do-also not-was.

助けてやりたい 'want to help (for someone)' — てやる is the giving auxiliary for inferiors or close people. どうしようもなかった 'there was nothing I could do, I was helpless' — a fixed expression for powerlessness. とは思うが sets up the contrast between desire and reality.