When Lucie marries, Carton confesses that her secretly loves her and would do anything for her. He basically tells her that he would give his life for someone she loves if that was necessary. This foreshadows Carton’s ultimate sacrifice when he trades places with Charles Darnay and dies in his place.
Sydney Carton gives his life for Lucie, so that she can be happy. He knows that they can never be together, because she loves Charles. He feels like his life is wasted, and the only way he can be useful to her is by sacrificing himself for her or someone she loves. This is why he ultimately dies so she can be happy.
As one of the "hundreds of people" who come to Soho and stop at the Manette household, Sydney Carton is a regular visitor. As if to soften the effrontery of Mr. Stryver's aspirations to have Lucie marry him, Carton, ironically termed by Dickens as "The Fellow with No Delicacy" enters Lucie's room to talk with her in Chapter 13 of Book the Second of A Tale of Two Cities. In great despondency, he resigns himself to his "profligate state:
"It is too late for [change]. I shall never be better than I am. I shall sink lower, and be worse."
He apologizes to Miss Manette for her compassion as he tells her that he would have been conscious of her misery had she loved him. And, knowing that she can have "no tenderness" for him, Carton tells her that she has been "the last dream" of his soul. Since he has known her, Carton has had new ideas of "striving afresh," but he fatalistically declares that his hopes are mere dreams. Yet, he asks her to let him carry the knowledge that there is something in him that Lucie can pity.
Sydney Carton then tells Lucie his last avowal:
"My last supplication of all is this; and with it I will relieve you of a visitor with whom I well know you have nothing in unison, and between whom and you there is an impassable space. It is useless to say it, I know, but it rises out of my soul. For you, and for any dear to you, I would do anything. If my career were of that better kind that there was any opportunity or capacity of sacrifice in it, I would embrace any sacrifice for you and for those dear to you. Try to hold me in your mind, at some quiet times, as ardent and sincere in this one thing. The time will come, the time will not be long in coming, when new ties will be formed about you—ties that will bind you yet more tenderly and strongly to the home you so adorn—the dearest ties that will ever grace and gladden you. Oh‚ Miss Manette, when the little picture of a happy father’s face looks up in yours, when you see your own bright beauty springing up anew at your feet, think now and then that there is a man who would give his life to keep a life you love beside you!”
Sydney's pledge to give his life if necessary for her happiness is a foreshadowing of the final chapters in which he sacrifices himself as Charles Darnay's double, again. As the sacrificial lamb, Carton goes to the guillotine in the place of Charles d'Evremonde, nephew of the nefarious Marquis d'Evremonde.