Great question! I've actually researched this in depth for a novel I'm writing in which a woman dies and goes to heaven to find that its very different from most people's conceptions. Here is the gist of what my research showed me regarding your question:
- People most definitely remember each other, continue relationships, and have a memory of their time on earth. The afterlife is just a continuation (albeit in a different way/dimension). The Bible has references of people in heaven asking about things or people on earth. Much of this life is to learn so if we forgot our life on earth once in heaven, that would pretty much defeat the purpose of what some of this life is about. And much of what heaven is about is relationships--with God and with others.
- An overwhelming amount of people who have had NDE's or died and came back say that loved ones meet them to escort them or "give them a tour" of heaven. In fact, not only do you recognize people you knew during your life on earth, but people have claimed to talk to and recognize biblical characters like Paul, King David, etc. There is a "knowing" of who people are at a greater level there.
- So if we know and recognize people in heaven, there is no reason for us to magically forget who our spouse was. Will there be "marriage" in heaven? My sources say "no"--not in the way we think of marriage. The "marriage" in heaven is the Bride (Jesus' beloved on earth) to the Bridegroom (Jesus). BUT I have read that people have companions in heaven--so if you were married on earth--your spouse could become your companion in heaven. I even read that those who did not marry on earth were still able to have a special companion in heaven. They are not exactly male and female, but there is masculine and feminine. And the oneness experienced by companions is a spiritual, emotional, and beyond our comprehension oneness. One source described it as the "two shall become one" literally happens there and the companions at times meld together as one essence or being. This oneness is also in an accord of oneness with God. The man who had been there and experienced it and came back had a very hard time explaining it because its not something the earthly mind can understand. Although he said its magnificent and ecstatic beyond anything we've experienced here.
- There is no envy or jealousy in heaven so relationships do not carry the strain they may carry on earth.