Typically in poetry we use the word scene rather than setting. Because poems are often much shorter than stories and leave out many details, it is often only possible to analyze a line or a stanza based on the internal or external scene that is depicted.
In this poem, there are two obvious external and internal scenes. The first is Jack's mother's house, where she receives the news that her son is dead. The Officer who brings the Colonel's letter consoles her in her time of grief with "gallant lies" about her son's heroism before he died. Upon hearing this, her eyes shine with a "gentle triumph" and even reflect a bit of "joy." The internal scenes (depicted by feelings or emotions) at the mother's house are two-fold: the officer is lying (he believed Jack to be a "cold-footed useless swine") and those lies leave Jack's mother with a memory of her son which makes her happy and proud.
The second external scene is back at war, likely WW1 as the description speaks of "trenches." In this scene, the truth of Jack's death is portrayed. He was a coward. He was not a strong nor brave soldier. He tried to get sent home and in the end, he died as a result of his fear and panic. "Went up" suggests that he attempted to flee the trench, was spotted, and shot.
The overall tone of this poem is one of bitterness and irreverence for the subject of war and a fallen soldier. To choose as the focus for a war poem someone who was neither respected nor missed ("no one seemed to care except that lonely woman") is an ironic and somewhat daring thing to do as a poet. Americans are taught to revere our soldiers, respect our leaders who are fighting for our freedom, and support our troops despite what we may think or believe about the concept or importance of war.
This poem does just the opposite. It paints a possibly realistic picture and portrays someone who is both pitiable and pathetic and yet, not pitied. The differences in the external scenes heighten the differences in the internal scenes. This poem suggests ideas of hypocrisy, irreverence and disrespect, and possible disagreement with the subject of war, the military, or protocol.