I don't understand the negativity towards the ending. (SPOILERS)
I understand that people don't like the fact that Emma dies. Or the fact that it happened so fast and so suddenly. But if you think about it, isn't that how real life works? In reality, most people do not know they're going to die. They don't get to say sorry to their loved ones for everything they did wrong, or tell them they love them and always have, or even give them a proper goodbye. In most cases, life just... ends. Unexpectedly.
I'll admit, when I first saw the scene I was devastated and even kind of angry that the writer/producer decided to kill the main character, and in such a horrible, quick way. But I think it works, because the whole movie is rooted in reality. Real life is not perfect. These two didn't have a fairy tale romance. They fell in and out of love and friendship for nearly 20 years. Later, they finally married, only to find out she couldn't have kids and then just-- died. I've learned to accept and even appreciate the ending. These two soulmates spent 20 years together. We as the audience have to quit thinking about the future they lost out on when she died. Instead think about the countless memories and years they had before.
This is exactly why the movie ends in a flashback-- to show us as the audience that the old saying is true: ''Don't cry because it's over, smile because it happened''. In the final flashback, Emma tells Dex, ''Whatever happens tomorrow, we had today''. That line in itself made me feel okay with the ending to their relationship. It doesn't make me happy that it happened. If it were up to me I'd have her stay alive of course. But the flashbacks at the end put everything into perspective and should help give the audience closure. That's also why the final words spoken in the movie, a flashback to the end of their first date, is so meaningful to her death and possible afterlife in 'Heaven'. He says, ''We'll see each other again'' and she replies, ''I know we will.''
There's a possibility for happiness even in their dark end.