Religious views on suicide
There are a variety of religious views on suicide.

Abrahamic religions

Christianity 

Nothing in the Christian Bible expressly prohibits suicide. In fact, the Bible does not condemn it and there are people in the Bible who died by suicide. However, many Christian dogmas take an unfavorable view of suicide. Christianity also does not say that suicide is an unforgivable sin, although some other religions might. 

According to the theology of the Roman Catholic Church, suicide is objectively a sin which violates the commandment "Thou shalt not kill".  However, the gravity and culpability for that sin changes based on the circumstances surrounding that sin.  The Catechism of the Catholic Church, Paragraph 2283 states: "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." Paragraph 2282 also points out that "Grave psychological disturbances, anguish, or grave fear of hardship, suffering, or torture can diminish the responsibility of the one committing suicide." The Catholic Church used to deny suicides a Catholic funeral mass and burial. However, the Church has since changed this practice.

Conservative Protestants (Evangelicals, Charismatics, Pentecostals, and other denominations) have often argued that suicide is self-murder, and so anyone who commits it is sinning and it is the same as if the person murdered another human being. An additional view concerns the act of asking for salvation and accepting Jesus Christ as personal savior, which must be done prior to death. This is an important aspect of many Protestant denominations, and the problem with suicide is that once dead the individual is unable to accept salvation. The unpardonable sin then becomes not the suicide itself, but rather the refusal of the gift of salvation.

Suicide is regarded generally within the Orthodox Tradition as a rejection of God's gift of physical life, a failure of stewardship, an act of despair, and a transgression of the sixth commandment, "You shall not kill" (Exodus 20:13). 
The Orthodox Church normally denies a Christian burial to a person who has died by suicide. However, factors bearing on the particular case may become known to the priest who must share this information with the diocesan bishop; the bishop will consider the factors and make the decision concerning funeral services. The condemnation of suicide is reflected in the teachings of Clement of Alexandria, Lactantius, St. Augustine and others. The Orthodox Church shows compassion, however, on those who have taken their own life because of mental illness or severe emotional stress, when a physician can verify a condition of impaired rationality.

Some other denominations of Christianity may not condemn those who commit suicide per se as committing a sin, even if suicide is not viewed favorably; factors such as motive, character, etc. are believed to be taken into account.  One such example is The New Church.  In The Church of Jesus Christ of Latter-day Saints (LDS Church), suicide is generally viewed as wrong, although the victim may not be considered responsible for the act depending on the circumstances.

In early Christian traditions, attitudes to suicide were somewhat varied. Among the martyrs at Antioch were three women who died by suicide to avoid rape. Although William Phipps gives this as an example of virtuous early Christian suicides, Augustine declared that although they may have done "what was right in the sight of God," in his view the women "should not have assumed that rape would necessarily have deprived them of their purity" (as purity was, to Augustine, a state of mind).  

 ("If I ascend up into heaven, thou art there: if I make my bed in hell, behold, thou art there.") has often been discussed in the context of the fate of those who commit suicide.

Islam

Islam clearly forbids suicide as a verse in the Quran instructs: 

The prohibition of suicide has also been recorded in statements of hadith (sayings of Muhammad); for example:

Muslim scholars and clerics consider suicide forbidden, including suicide bombing.

Judaism

Suicides are frowned upon and buried in a separate part of a Jewish cemetery, and may not receive certain mourning rites. In practice, every means is used to excuse suicide—usually by determining either that the suicide itself proves that the person was not in their right mind, or that the person must have repented after performing the deadly act but shortly before death occurred. Taking one's own life may be seen as a preferred alternative to committing certain cardinal sins. Most authorities hold that it is not permissible to hasten death to avoid pain if one is dying in any event, but the Talmud is somewhat unclear on the matter. However, assisting in suicide and requesting such assistance (thereby creating an accomplice to a sinful act) is forbidden, a violation of Leviticus 19:14 ("Do not put a stumbling block before the blind"), which is understood as prohibiting tempting to sin as well as literally setting up physical obstacles.

Mass suicide has had a long-standing history in Judaism where it was also acceptable to other alternatives. According to the 1st-century CE Jewish historian Josephus, Herod the Great fortified Masada between 37 and 31 BCE as a refuge for himself in the event of a revolt. In 66 CE, at the beginning of the First Jewish-Roman War, a group of Jewish extremists called the Sicarii overcame the Roman garrison of Masada. After the destruction of the Second Temple in 70 CE, additional members of the Sicarii and numerous Jewish families fled Jerusalem and settled in the mountaintop fortress, using it as a base for harassing the Romans. This 960-strong Jewish community at Masada collectively killed themselves in 73 CE rather than be conquered and enslaved by the Romans. Each man killed his wife and children, then the men drew lots and killed each other until the last man killed himself. In this way, only the last man died by suicide.

Dharmic religions

Buddhism
In Buddhism, an individual's past acts are recognized to heavily influence what they experience in the present; present acts, in turn, become the background influence for future experiences (the doctrine of karma). Intentional actions by mind, body or speech have a reaction. This reaction, or repercussion, is the cause of conditions and differences one encounters in life.

Buddhism teaches that all people experience substantial suffering (dukkha), in which suffering primarily originates from past negative deeds (karma), or may result as a natural process of the cycle of birth and death (samsara). Other reasons for the prevalence of suffering concern the concepts of impermanence and illusion (maya). Since everything is in a constant state of impermanence or flux, individuals experience dissatisfaction with the fleeting events of life. To break out of samsara, Buddhism advocates the Noble Eightfold Path, and does not advocate suicide.

In Theravada Buddhism, for a monk to so much as praise death, including dwelling upon life's miseries or extolling stories of possibly blissful rebirth in a higher realm in a way that might condition the hearer to commit suicide or to pine away to death, is explicitly stated as a breach in one of highest vinaya codes, the prohibition against harming life, one that will result in automatic expulsion from Sangha.

For Buddhists, since the first precept is to refrain from the destruction of life, including one's self, suicide is seen as a negative act. If someone commits suicide in anger, he may be reborn in a sorrowful realm due to negative final thoughts. Nevertheless, Buddhism does not condemn suicide without exception, but rather observes that the reasons for suicide are often negative and thus counteract the path to enlightenment.  With that said, in thousands of years of Buddhist history, very few exceptions are found.

One exception is the Buddhist tale of a bhikkhu named Vakkali who was extremely ill and racked with excruciating pain. He was said to have died by suicide when near death and upon making statements suggesting he had passed beyond desires (and thus perhaps an arhant).  Self-euthanasia appears the context for his death.

Another exception is the story of a bhikkhu named Godhika, also beset by illness, who had repeatedly attained temporary liberation of mind but was unable to gain final liberation due to illness. While believing himself again in a state of temporary liberation it occurred to him to cut his own throat, in hopes thus to be reborn in a high realm. The Buddha was said to have stated:

Ultimately, tales like these could be read as implying past Buddhist beliefs that suicide might be acceptable in certain circumstances if it might lead to non-attachment. However, people who have achieved enlightenment do not commit suicide. In both above cases, the monks were not enlightened before dying by suicide but they hoped to become enlightened following their deaths.

The Channovàda-sutra gives a third exceptional example of one who died by suicide and subsequently attained enlightenment.

In an entry in The Encyclopedia of Religion, Marilyn J. Harran wrote the following:

Another exceptional example is the act of Sokushinbutsu in Japanese Buddhism, which involves asceticism to the point of death and entering mummification while alive. This is done to attain Buddha-nature in one's body.

Hinduism
In Hinduism, suicide is spiritually unacceptable. Generally, taking your own life is considered a violation of the code of ahimsa (non-violence) and therefore equally sinful as murdering another. Some scriptures state that to die by suicide (and any type of violent death) results in becoming a ghost, wandering earth until the time one would have otherwise died, had one not died by suicide. 

The Mahabharata talks of suicide, stating those who commit it can never attain to regions (of heaven) that are blessed.

Hinduism accepts a person's right to end one's life through the non-violent practice of fasting to death, termed Prayopavesa. But Prayopavesa is strictly restricted to old age yogis who have no desire or ambition left, and no responsibilities remaining in this life. Another example is dying in a battle to save one's honor.

Sati or suttee is an obsolete funeral custom where a widow immolates herself on her husband's pyre or takes her own life in another fashion shortly after her husband's death. The practice continued to occur scantily in India in the 1980s, although it is officially banned.

Jainism
In Jainism, suicide is regarded as the worst form of himsā (violence) and is not permitted. Ahimsā (nonviolence) is the fundamental doctrine of Jainism. There exists a Jain practice of fasting to death which is termed as sallekhana. According to the Jain text Purushartha Siddhyupaya, "when death is near", the vow of sallekhanā is observed by properly thinning the body and the passions. It also mentions that sallekhanā is not suicide since the person observing it is devoid of all passions like attachment.

Neopagan religions

Wicca
In Wicca as well as numerous other Neopagan religions, there is no general consensus concerning suicide.  Some view suicide as a violation of the sanctity of life, and a violation of the most fundamental of Wiccan laws, the Wiccan Rede.  However, as Wicca teaches a belief in reincarnation instead of permanent rewards or punishments, many believe that suicides are reborn (like every one else) to endure the same circumstances in each subsequent lifetime until the capacity to cope with the circumstance develops.

Notes