Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1. Rape is one of the worst crimes in Islam.
2. Preventing this crime is the responsibility of everyone.
3. A rape victim is encouraged to defend herself.
4. Islam condemns the rapist, not the rape victim.
5. Committing suicide is not allowed to avoid rape.
6. Dying while defending oneself is a type of martyrdom.
Rape is one of the major sins and most heinous crimes that Islam never tolerates. This crime is even worse than the crime of adultery as it involves the use of force and coercion. When it is used as part of hostility in a civil war or a conflict, it is even worse and worse.
Islam grants a rape victim the right to defend herself even if that leads to the killing of the attacker if no less defense measure is possible. Preventing this crime and protecting and defending the victim are the responsibilities of the state, the community and any person present at the crime scene.
It goes without saying that being a victim of rape does not make a person liable to any punishment in Islam. Rather, condemnation and punishment are reserved for the rapist who committed this heinous crime.
Answering your question, Dr. Muhammad Salama, PhD in Islamic Studies in English, Associate Professor at the Faculty of Islamic Sciences al-Madinah International University (Mediu) states:
Committing suicide is an enormous sin. Almighty Allah says, “And you shall not kill yourselves. Indeed, God is ever merciful to you.” (An-Nisaa’ 4:29)
The Messenger of Allah (peace and blessings be upon him) says, “Whoever throws himself from a mountain and kills himself will be in the Hellfire falling down into it wherein he will abide forever and ever, and whoever drinks poison and kills himself will be carrying his poison in his hand and drinking it in the Hellfire wherein he will abide forever and ever; and whoever kills himself with an iron weapon will be carrying that weapon in his hand and stabbing his Abdomen with it in the Hellfire wherein he will abide forever and ever.” (Al-Bukhari)
Scholars are in agreement that no matter how hard is a circumstance for a person this does not justify committing suicide.
Rape is, of course, is very hard and painful experience for a woman. But still she may not commit suicide. She has the right to defend herself by all means and fight for the last breath; and if she dies in this fighting, her death is a kind of martyrdom.
Allah Almighty knows best.