O. Henry creates sympathy for the young man, the story's protagonist, via description and selection of detail. We learn that "he had rung" the doorbell of eleven houses before he found one with a room to let. He seems quite tired, despite his youth, and so "rested his lean hand baggage" on the step, "wip[ing] the dust from his hatband and forehead." He has, evidently, been searching for some time and traveling some distance. His weariness is clear and creates sympathy.
When the young man sees the housekeeper, she strikes him as being like
an unwholesome, surfeited worm that had eaten its nut to a hollow shell and now sought to fill the vacancy with edible lodgers.
To him, she appears to be predatory and greedy, as though he is helpless against her, her hapless victim. Eventually, we learn that he has been searching for a young woman for five months and that he "had loved her best." His "ceaseless interrogation," however, has always resulted in "inevitabl[y] negative" responses.
Later, we see the young man begin to despair. He believes that he can smell the young woman's perfume in that very room, but when he checks again with the landlady, the woman confirms that a young woman of the description he's provided has not been there. The narrator says, then, that "the ebbing of [the young man's] hope drained his faith," and he decides to take his own life just then. All of these descriptions and details create sympathy for him.
Ultimately, we learn that the room's previous tenant was, indeed, the young lady whom the young man sought and that she, too, took her life in that room. In other words, he'd just missed her. This example of dramatic irony creates even further tragedy and compels our sympathy for the young man.