From the Catechism of the Catholic Church:
2276 Those whose lives are diminished or weakened deserve special respect. Sick or handicapped persons should be helped to lead lives as normal as possible.
2277 Whatever its motives and means, direct euthanasia consists in putting an end to the lives of handicapped, sick, or dying persons. It is morally unacceptable.
Thus an act or omission which, of itself or by intention, causes death in order to eliminate suffering constitutes a murder gravely contrary to the dignity of the human person and to the respect due to the living God, his Creator. The error of judgment into which one can fall in good faith does not change the nature of this murderous act, which must always be forbidden and excluded.
2278 Discontinuing medical procedures that are burdensome, dangerous, extraordinary, or disproportionate to the expected outcome can be legitimate; it is the refusal of "over-zealous" treatment. Here one does not will to cause death; one's inability to impede it is merely accepted. The decisions should be made by the patient if he is competent and able or, if not, by those legally entitled to act for the patient, whose reasonable will and legitimate interests must always be respected.
2279 Even if death is thought imminent, the ordinary care owed to a sick person cannot be legitimately interrupted. The use of painkillers to alleviate the sufferings of the dying, even at the risk of shortening their days, can be morally in conformity with human dignity if death is not willed as either an end or a means, but only foreseen and tolerated as inevitable Palliative care is a special form of disinterested charity. As such it should be encouraged.
2280 Everyone is responsible for his life before God who has given it to him. It is God who remains the sovereign Master of life. We are obliged to accept life gratefully and preserve it for his honor and the salvation of our souls. We are stewards, not owners, of the life God has entrusted to us. It is not ours to dispose of.
2281 Suicide contradicts the natural inclination of the human being to preserve and perpetuate his life. It is gravely contrary to the just love of self. It likewise offends love of neighbor because it unjustly breaks the ties of solidarity with family, nation, and other human societies to which we continue to have obligations. Suicide is contrary to love for the living God.
2282 If suicide is committed with the intention of setting an example, especially to the young, it also takes on the gravity of scandal. Voluntary co-operation in suicide is contrary to the moral law. Grave psychological disturbances, anguish, or grave fear of hardship, suffering, or torture can diminish the responsibility of the one committing suicide.
2283 We should not despair of the eternal salvation of persons who have taken their own lives. By ways known to him alone, God can provide the opportunity for salutary repentance. The Church prays for persons who have taken their own lives.