"And Jesus again crying with a loud voice, yielded up the ghost." Here those things are treated which were done after death. And first, the death of Christ is set forth; second, what was done; third, the effect. The second is at "and behold, the veil of the temple was rent"; the third is at "now the centurion etc." Concerning the first, the death and the manner of death are touched upon. A threefold cause of death is assigned: one cause was to show how much he loved us. Augustine says: there is no greater proof of love than to be forestalled in loving. Romans 5:8: "God commendeth his charity t...owards us, because when we were yet sinners, Christ died for us." Likewise, to teach us to despise death. Through death he destroyed all sins. Likewise, to take away the punishment of Adam's sin, namely to free us from Adam's sin. For it had been said to him, Genesis 2:17: "in what day soever you shall eat, you shall die": from this death he freed us. Likewise, because the Devil, who is the author of death, had attacked him who had not deserved it; therefore he lost his power over others; therefore he handed over his soul to death, so as to free ours. Likewise, the manner of death is indicated: "and crying with a loud voice, he yielded up the ghost." Some have said that the divinity died; but this is false, because life cannot die, and God is not only living but is also life itself. Some have said that the soul dies with the body: which cannot be, because then it could not attain immortality. Likewise, it should be noted that all men die by necessity; but Christ died by his own will. Hence it does not say he died, but "he yielded up," because it was by his will, and this signifies his power, as is said elsewhere, John 10:18: "I have power to lay down my life, and I have power to take it up again." And he willed to die with a loud voice, to signify that he was dying by power and not by necessity: hence he laid down his soul when he willed, and took it up when he willed. Hence it was easier for Christ to lay down his soul and take it up again than for someone to fall asleep and wake up. But why was it imputed to them? Because they did what was in their power.
Source: Commentary on Matthew