It's too bad that he died, but it's good that he didn't suffer along the way.
It's sad that she passed away, but at least she didn't have to suffer during her passing.
この場合、次のように言うと良いでしょう。
ーIt's too bad that he died, but it's good that he didn't suffer along the way.
「彼が亡くなったのは残念ですが、苦しまれなかったので良かったです」
along the way は亡くなるまでの間を指しています。
ーIt's sad that she passed away, but at least she didn't have to suffer during her passing.
「彼女が亡くなったのは残念ですが、逝去の際、少なくとも彼女は苦しまなかっので良かった」
人が亡くなることは to die の他にも to pass away という言い方もできます。
during one's passing で「逝去の際」
ご参考まで!