The poem operates on contrast as arithmetic. Line 1 gives you a door. Line 6 gives you the same door, same speaker, same situation—but now the speaker counts herself >"Lost doubly."< The glimpse of domestic comfort (warmth, wealth, company) doesn't comfort; it quantifies deprivation.
Dickinson uses economic language throughout: "wealth," "disclosed" (a financial term for revealing assets), and the final phrase "Enlightening misery" which plays on Enlightenment rationalism. To enlighten usually means to educate or free from ignorance. Here it means the opposite—clarity makes suffering worse. You can't miss what you can't see.
The repetition of "I, lost, was passing by" (lines 2 and 6) is the structural hinge. Same words, different meaning. First time: simple statement of being lost. Second time: the word "lost" now carries the weight of contrast. The door opened and shut >"as sudden"< (line 5)—Dickinson's compression of "as suddenly"—emphasizing speed. The experience is over before it begins, but its effect is permanent.