For different reasons, Nora Helmer and Willy Loman are both living a lie. Nora is supposed to be the perfect, middle-class wife—demure, child-like, and totally supportive of her husband. Yet beneath the surface, all's not well. Nora becomes deeply embroiled in the big old world outside on account of her complicity in an act of financial fraud. This forces her to take stock of her life and leads to her eventual realization that her marriage is a complete sham.
Willy Loman is living the lie that he's a hot-shot salesman; not only that, but a "well-liked man" to boot. Unlike Nora, however, he's unable to face up to the truth and actually do something to change his life. He remains trapped in his self-delusions right up until his tragic death. Society expects Willy to go out into the world like his late brother Ben and stake his claim; and that's precisely what he tries to do each day, without much success. Willy has internalized society's dominant values to such an extent that he can never escape from them. His world of rampant individualism, where a man's worth is measured by how many sales he makes, is the only one he knows, making it more difficult for him to leave it behind.
Nora, on the other hand, has experience of the world outside the home as well as inside, so in some respects is actually more worldly than Willy, despite surface appearances. Financial fraud is a serious business, but at least it gives Nora a much-needed glimpse into a completely different world beyond the confines of hearth and home.
At the end of A Doll's House, when Nora famously slams the door behind her as she leaves, she abandons her children as well as her husband. Willy Loman also abandons his children, albeit in a different way. By forcing upon them an unrealistic ideal of success, he's effectively failing in his duties as a parent.
One of the central comparisons that can be made between these two works is the way in which characters in both delude themselves and others and ignore the truth and reality of their situation. It is clear as both plays develop that this is the case for both protagonists; Nora deliberately tries to keep her husband from finding out about her actions and plays the role of loving wife just as Willy attempts to convince both himself and those around him that he is a success. Note how Torvald refers to his wife at the beginning of the play, showing how she is assuming a role and playing a part of devoted wife:
My little singing bird mustn't go drooping her wings, eh? Has it got the sulks, that little squirrel of mine? [Takes out his wallet] Now what do you think I've got here?
The roles between Torvald and Nora are not really that of a husband and wife but more accurately that of a father and a child. Characters play roles in this play that conceal their real selves. In the same way, Willy still repeats his broken litany trying to convince both himself and those around him of his success in his job as a salesman:
I'm the New England man. I'm vital in New England.
As the play progresses, we see this for the outright lie it is as reality catches up with Willy and he is forced to face the failure of his working life. In both plays, therefore, reality finally catches up with the central characters, with Nora accepting the way that she has allowed herself to be treated like a child and not a woman, and Willy coming to understand that he is a failure.
The major difference is of course the element of tragedy. For Nora, this self-understanding can actually be seen as hopeful. Even though she defiantly leaves her former life behind her, the audience is given a sense of hope as she determines to find herself and live her life on her own terms. Self-understanding is literally the death of Willy, fitting this play into the genre of Domestic Tragedy.