The narrator was lonely and sad because he was only thinking about Lenore he couldn’t get his mind out of her. “vainly I had sought to borrow from my books surcease of sarrow-sarrow for the lost Lenore” trying to get distracted himself and let it slip from his memory.
When the raven went inside the house when the narrator opens the window he was happy. “then tis ebony bird beguiling my sad fancy into smiling” the raven got to put