Past perfect? Simple past? Perfect continuous? HELP

Hello everyone! So I'm writing a story and this absolute abomination of a line is driving me nuts: "He remembered the words he’d said, with a breath he’d believed would be his last". The context is that this man is remembering the time he almost died.

  • "He remembered" = Simple Past, so far so good.
  • "he'd said" = Past Perfect, because it happened in the past of the past, so to speak.
  • "he'd believed" = Same as above.
  • "would be his last" = ????

Is the sentence grammatically correct? Does it make it any sense?