Examining the psychology of Superman in this telling of his story gives us a strong answer.
Remember that throughout this movie Superman has faced criticism and doubt as to his character, presence, and purpose. Faced with this existential pressure he is visited by his father in a dream and it is precisely during this dream that I believe he receives the "nugget" of wisdom that produces the action we see in the end. His father tells him the story of having saved his family's farm only to have condemned the neighbors farm to destruction in the process. The message is a bit murky but one thing is clear: with any victory comes sacrifice.
Superman already feels much guilt over his failure to stop the bomb in the capitol and is also frustrated with the world's accusations that he is at fault for the deaths of all those connected with the Metropolis incidents. Now, facing another Kryptonian foe, he understands one gigantic lesson that will lead to him becoming the Superman that many are familiar with: self-sacrifice. If he wants to save everyone else, it must be him that receives the full weight of the cost of that victory. Or said another way: To prevent the destruction of the neighbor's farm, he must destroy his own.
Could he have given the spear to another? Maybe. Could he have thrown it? Maybe. There is only one way to be absolutely certain the beast falls, however. He must put the spear through its heart himself, regardless of personal cost. Thus, his decision was one of idealism, and heavily influenced by the previous events of the story.