The Town

Four lifelong friends from the Charlestown neighborhood of Boston, Douglas "Doug" MacRay, James "Jem" Coughlin, Albert "Gloansy" MacGloan, and Desmond "Dez" Elden, rob a bank. They take the manager, Claire Keesey, hostage, but release her unharmed. When they find out Claire lives in their neighborhood, Doug begins to follow her to find out how much she has told the authorities, and to make sure that Jem does not eliminate her as a witness. Soon a romance grows between them, which Doug hides from the gang. As they grow closer, Doug tells Claire of his search for his long-lost mother, whom he believes went to live with his aunt in Tangerine, Florida. He also recounts his chance to be a professional hockey player which he threw away for a life of crime, following in his father's footsteps. She in turn tells Doug that she saw a tattoo on one of the robbers, and he realizes that she can identify Jem and send them all to jail. He knows that Jem will kill her if he discovers the truth, so he persuades her that the authorities cannot protect her, and she decides not to tell the police.
After Claire tells Doug about being harassed and her car vandalized by Alex, a local thug, Doug enlists Jem for a favor, which they can never talk about. Doug and Jem don hockey masks and violently assault the offenders without Jem knowing the true reason for the favor is to protect Claire.
FBI Agent Adam Frawley surveils the gang and recognizes their ties to local crime lord Fergus "Fergie" Colm, who has another robbery planned for them. During a visit to his father Stephen in prison, Doug reveals his plans to leave Boston and go to Florida. The gang's next robbery in the North End goes awry, and the gang barely escapes. The gang is interrogated by Frawley, but he fails to get any confessions and is forced to release them. Doug asks Claire if she will go away with him, and she agrees. When Frawley learns that Claire quit her job, he wiretaps her phone, and threatens to prosecute her as an accomplice after realizing that she is seeing Doug. Shocked to discover that her lover was one of her assailants, she is forced to cooperate with the FBI and breaks up with Doug. Meanwhile, Fergie and Jem are pressuring Doug about the next heist, but Doug is determined to get out. Fergie threatens to kill Claire if Doug does not go through with the job, and reveals to Doug how he controlled his father by making his mother an addict, which led to her suicide. Doug gives in but swears that he will kill Fergie if anything happens to Claire.
At Fenway Park, Doug and Jem enter disguised as Boston police officers, steal $3,500,000 in gate cash, and prepare to escape in an ambulance disguised as paramedics. Doug's ex-girlfriend Krista, threatened by Frawley and heartbroken by Doug's going away without her, reveals enough for the FBI to surround Fenway before the gang can get out. The gang is caught in a firefight with FBI SWAT, and Dez and Gloansy are killed. Frawley spots Jem and they exchange gunfire. Jem, determined not to go back to prison and out of ammunition, commits suicide by cop by running out of cover with his guns unloaded and is killed. Knowing that Claire is in danger and that he will never escape as long as Fergie is alive, Doug murders Fergie and his bodyguard and calls Claire. Watching from across the street via binoculars, Doug sees that the FBI are with Claire as she tells him to come over, he at first thinks she means to betray him, but eventually she gives him a clue to warn him away, which he picks up on. So Doug flees instead, donning an MBTA uniform and escaping on a train; having left a note on Frawley's car for him to "Go Fuck Yourself". Later, whilst gardening, Claire finds a bag buried containing the stolen money, a tangerine, and a note from Doug, suggesting that she can make better use of the money than he can, and that they'll hopefully see each other again. Claire donates the money, in memory of Doug's mother, to refurbish the local ice hockey arena where Doug once played. From the deck of a small house, Doug looks out over the water, forlorn and alone, but seemingly safe in Florida.

Question: How does Jem die?
Answer: suicide by cop