“She Dwelt Among the Untrodden Ways” is one of Wordsworth’s “Lucy poems.” There is a debate about who Lucy was or who “Lucy” represented. Fittingly (since we don’t really know who she was), the speaker describes her as “A violet by a mossy stone/Half hidden from the eye!” With the exception of the speaker (presumably Wordsworth), she lived, and died, unnoticed and loved by few.
The poem begins with “She dwelt,” so we know right away that Lucy is dead. She is described as physically isolated from the world and generally unknown. This physical isolation and mystery could imply that Lucy is not real. She is just an Ideal person from whom Wordsworth gets inspiration. For example, the speaker also says she is as fair as one star shining in the sky. One star in the sky is bound to be noticed by everyone. But I think the speaker is making a comparison that she was not noticed by most people, but that he noticed her as if she were the only thing noticeable.
The Lucy poems are written as if the speaker has admired her from afar. Even if Lucy represented a real person, she also represented an Ideal for Wordsworth. If she represented this Ideal concept of inspiration and she died, then the speaker is lamenting the loss of his source of inspiration. This could be general despair, nostalgia or even just a creative slump. The consolation is that he has the memory of Lucy: the person or the source of inspiration (Imagination).