Sergeant Frank Troy frequently displays poor behavior that is partially responsible for his death. He is also a pivotal character because his relationship with Bathsheba Everdene is essential for determining not only his fate, but also the fate of Bathsheba's other two suitors: Gabriel Oak and Mr. Boldwood. Thus, a consideration of Troy's literal end should also examine his self-destructive behavior and how it affects the overall story.
Troy's romance and marriage to Bathsheba seem to occur quickly, which foreshadows how swiftly the marriage will dissolve. Troy's behavior is ill-suited to a life of farming: his drinking, gambling, and general laziness hasten the end of the romance and happiness of the marriage. In addition to these circumstances, Troy's unhappiness is exacerbated by the death of his wife's former servant girl, who he secretly loves.
At the beginning of chapter 47, "Adventures by the Shore," Troy is described as despondent. "The ... humdrum tediousness of a farmer's life, gloomy images of her who lay in the churchyard, remorse, and a general averseness to his wife's society, impelled him to seek a home in any place on Earth save Weatherbury." These conditions may seem to suggest that Troy is suicidal; however, his search for a "home in any place on Earth" suggests that he wants to end his married status--not his life. Unfortunately, he decides to go swimming and is trapped in a current that "was awkward for a swimmer who might be taken in it unawares. Troy found himself carried to the left and then round in a swoop out to sea." Shortly thereafter, Troy recalls that many people have drowned in that area and he "began to deem it possible that he might be added to their number." This is yet another example of Troy's poor decision making. At the end of the chapter, the reader is told that Troy is rescued, but abandonment of his clothes on the shore creates an assumption that he drowns.
Troy's presumed death allows for Farmer Boldwood to court Bathsheba again. However, in chapter 53, Troy returns during Boldwood's Christmas party to reassert his marriage, getting physical with his wife: "...he seized her arm and pulled it sharply. Whether his grasp pinched her, or whether his mere touch was the cause, was never known, but at the moment of his seizure she writhed, and gave a quick, low scream." This behavior (and likely the depression caused by again losing Bathsheba) causes Boldwood to react by shooting Troy, which causes Troy's death.
It can be argued that even though Troy is murdered by Boldwood, his somewhat self-destructive and irresponsible behavior are at least partially responsible for his actual death. Furthermore, Troy's death effectively ends the story of Bathsheba's romances. Boldwood is imprisoned for Troy's death, which gives Gabriel Oak--arguably the hero of the story--the opportunity to marry Bathsheba. The novel concludes with them married, and the reader is given the impression that this marriage will last since Oak is far more responsible and caring than Troy. Thus, the end of Troy's life allows for the creation of a new marriage and the beginning of a new life for the two primary characters.