Mercedes marries Fernand so her husband Albert will have a father.
This is a story about revenge, but Mercedes is an innocent party. She was supposed to marry Dantes right before he got hauled off to prison. She had no idea that Danglars and Fernand were planning any kind of conspiracy against Dantes. She and Dantes were also a little early in consummating the wedding, and they produced a son. All of that put her in a really difficult situation when Fernand, who was very jealous of Dantes, continued to pursue her after Dantes ended up in the Chateau d'If prison for a very long time and she had a son to raise.
"Well, Mercedes was married … for I saw at this time he was in constant dread of Edmond's return -- Fernand was very anxious to get his wife away, and to depart himself. (Ch. 27)
Mercedes marrying Fernand did not make Dantes want to get revenge on her, necessarily, but it did not make him predisposed to like Albert. Dantes already had great plans for Fernand. It was his mission after he escaped from prison to get revenge on every one of the conspirators that put him there.
Fortunately, Dantes was intelligent and had a good education by then. His time in prison was well spent, and he was bankrolled by the treasure. Dantes was able to remake himself into the Count of Monte Cristo and take out his enemies one by one. He was a patient man. He did not care how long it took him to do it.
Mercedes still loved him, even after all that time. She had married Fernand only for her son’s sake. When she saw Dantes again, in full Count regalia, she was just pleased that he was alive, even though she was saddened that he saw what she had become and the way that he looked at her. He would not take food from her, and the conversation was awkward.
"I have suffered deeply, madame," answered Monte Cristo.
"But now you are happy?"
"Doubtless," replied the count, "since no one hears me complain."
"And your present happiness, has it softened your heart?"
"My present happiness equals my past misery," said the count. (Ch. 71)
Mercedes was frustrated when Albert told her that Monte Cristo refused to eat or drink anything at their house because he was going to get revenge on them.
On the night before the duel, Mercedes tried to appeal to Dantes’s humanity, telling him that it is really her that he needed to seek revenge on. Everything else was in the past.
"Ah, sir!" cried the countess, "how terrible a vengeance for a fault which fatality made me commit! -- for I am the only culprit, Edmond, and if you owe revenge to any one, it is to me, who had not fortitude to bear your absence and my solitude." (Ch. 89)
Mercedes told Albert who his real father was, and the story of the Count of Monte Cristo. One by one, his enemies had fallen due to his cunning. Mercedes was not one of them, and neither was Albert.
They say revenge is a dish best served cold. That was definitely the case with Dantes. He waited a long time for his revenge, and used his brains and his wealth to help his enemies destroy themselves. Mercedes was in some ways an innocent victim, and in some ways a woman who made a hard choice. She suffered along with Dantes.