I also love the fountain, such a beautiful film.
But I think that the story works a little different:
(BIG SPOILERS, INCLUDING ENDING)
Tommy's wife, Izzy, has cancer. Tommy is doing research in order to cure that type of cancer, and he tries something with a strange tree of South America. Tommy's wife gets worse although she is accepting it, then she dies. The experiment with the tree shows positive results. Then Tommy realizes that there's a parallelism between the tree of Izzy's story and the real tree, so he thinks that the part about a tree being able of hold the spirit of a dead person and a star being able to resurrect people might also be true.
Then he plants a tree in Izzy's grave and builds a spaceship in order to reach the star. However, the tree dies before he gets there but he finally learns to accept Izzy's death and his own as the dying star explodes.
As I see it, the story actually takes place in the "future", the "present" is a flashback and the "past" is a fictional story, working as a framing device.
And about the theme of the film I also agree that is about the acceptance of death
It is a powerful message how Izzy accepts death and, in facing the idea of death, she comes to a different understanding of the universe where the boundaries between her and everything else become thinner.
However Tommy is afraid of mortality and the death of his loved ones, so the idea of Izzy saying "finish it" and Tommy answering "I don't know how it ends" shows how Tommy's fear doesn't allow him to find confot in the idea of death or seeing that Izzy has a different perpective about it.
In each of the three stories of the film, Tom starts a quest, in one he is sent by his queen, in other he is working to cure Izzy's cancer and in the other one he is trying to resurrect her. In each of these quest he's haunted by death, in the forms of the Spanish inquisitor, cancer and time. And, at the end of each quest, he finds what he was looking for, but not as how he imagined it.
Tommy realizes that he can't save Izzy's live, because she didn't need saving, he accepts mortality as a natural part of life and therefore, in death he finds eternal life.
I love how the fountain deals with the concept of death with all that hope. Most movies that have a message of "accepting" death in a form of "Do not mess with the natural order", but few show an idea of actual acceptance and even comfort in the nature of death, and not denying the obscure and misterious idea of a concept that we can barely try to comprehend until we face it.
This is also part of the reason why I love more human and sympathetic depictions of death or the grim reaper.