Has anyone ever died of lettuce

Is it permissible to offer funeral prayers for someone who has committed suicide?

Yes, it is.

Allah mentions in the Koran the people for whom a funeral is not allowed:

وَلَا تُصَلِّ عَلَىٰ أَحَدٍ مِّنْهُم مَّاتَ أَبَدًا وَلَا تَقُمْ عَلَىٰ قَبْرِهِ ۖ إِنَّهُمْ كَفَرُوا بِالملَّهِ َاِقُرَسُ ُلِهِووَم

And don't pray over any of those who have ever died or are standing by their grave. In fact, they did not believe in Allah and His Messenger and died while defiantly disobedient (fasiq).

Quran 9:84

It follows logically from this that it is permissible to pray the funeral for anyone who has a Muslim and no Kafir and no Fasiq is but has committed sins that are lesser.

إِنَّ اللَّهَ لَا يَغْفِرُ أَن يُشْرَكَ بِهِ وَيَغْفِرُ مَا دُونَ ذَ‌ٰلِكَ لِمَن يَشَاءُ ۚ وَمَن يُشْرِكْ بِاللَّهِ فَقَمًاا افْتَرَىٰ إِثْيمافْ افْتَرَىٰ إِثْميمفَقَد اَتَرَىٰ إِثْميماع

Indeed, Allah does not forgive association with Him, but He forgives what is less than what He wills for. And whoever connects others to Allah has certainly invented an enormous sin.

Quran 4:48

Although it should be obvious that a suicide is not automatically an infidel and can be forgiven, the following hadith in Saheeh Muslim under the title باب الدليل على ان قاتل نفسه لا is foolish (The Chapter: The Proof That The One Who Himself kills, not told) told as an unbeliever):

ان الطفيل بن عمرو الدوسي, اتى النبي صلى الله عليه وسلم فقال يا رسول الله هل لك في حصن حصين ومنعة - قال حصن كان لدوس في الجاهلية - فابى ذلك النبي صلى الله عليه وسلم للذي ذخر الله للانصار فلما هاجر النبي صلى الله عليه وسلم الى المدينة هاجر اليه الطفيل بن عمرو وهاجر معه رجل من قومه فاجتووا المدينة فمرض فجزع فاخذ مشاقص له فقطع بها براجمه فشخبت يداه حتى مات فراه الطفيل بن عمرو في منامه فراه وهييته حسنة وراه مغطيا يديه فقال له ما صنع بك ربك فقال غفر لي بهجرتي الى نبيه صلى الله عليه وسلم فقال ما لي اراك مغطيا يديك قال قيل لي لن نصلح منك ما افسدت. فقصها الطف يل على رسول الله صلى الله عليه وسلم. فقال رسول الله صلى الله عليه وسلم "اللهم وليديه فاغفر"

It is reported at the instigation of Jabir that Tufail, the son of Amr al-Dausi, came to the apostle (ﷺ) and said:

... When the apostle (ﷺ) emigrated to Medina, Tufail, the son of Amr, also emigrated to this place, and there a man of his tribe emigrated with him.

But the climate of Medina did not suit him and he got sick. He felt very uncomfortable. So he grabbed an iron arrowhead and cut his finger joints. The blood flowed from his hands until he died.

Tufail, the son of Amr, saw him in a dream. His condition was good and he saw him with his hands wrapped around him.

He (Tufail) said to him: What treatment has your Allah given you?

He answered. Allah granted me forgiveness for my journey to the apostle (ﷺ).

He (Tufail) said again: What is it that I see you wrap your hands?

He replied: I was told (by Allah): We would not correct anything from you that damaged yourself.

Tufail told this (dream) to the Messenger of Allah (ﷺ).

He then prayed: O Allah, forgive his hands.

Muslim

The above is evidence that the Prophet prayed for a person who killed himself.

Now to the funeral prayer for such a person: There is a hadith that says that the Prophet did not offer a funeral for a person who killed himself:

عن جابر بن سمرة ، قال اتي النبي صلى الله عليه وسلم برجل قتل نفسه بمشاقص فلم يصل عليه

Jabir b. Samura reported:

(The corpse) of a person who had killed himself with a broad-headed arrow was brought before the Messenger of Allah (), but he did not offer prayers for him.

Muslim

It is from "

Narrated from Jabir bin Samurah: A man killed himself with an arrowhead and the Messenger of Allah said: "I will not pray for him."

Nisai

The words of the Prophet اما انا فلا اصلي عليه (I will not pray for him) show that the Prophet did not offer the funeral himself, but the Sahaba, and the Prophet neither prohibited nor invalidated it ... hence it is allowed and what the prophet did to himself was to show his displeasure with the act.

This is analogous to the case of a person who died without paying their debts and the Prophet did not offer his burial but asked the sahaba to offer it:

ثم اتي بجنازة اخرى ، فقال "هل عليه من دين". قالوا نعم. قال "صلوا على صاحبكم".

Another dead person was brought in and asked, "Is he in debt?" They said, "Yes." He (refused to lead the prayer and said), "Lead your friend's prayer." Abu Qatada said: "O Allah's Messenger ()! I undertake to pay his debts." Allah's Messenger (ﷺ) then presided over his funeral prayer.

Bukhari

Below are some relevant excerpts from the views of Sunni schools on the matter:

من قتل نفسه ولو عمدا يغسل ويصلى عليه به يفتى

And the person who kills himself, if deliberately, then he will be bathed and the funeral will be prayed and this is the fatwa to that.

Radd al-Muhtar ala al-Dur al-Mukhtar by Ibn Abidin Shami from library.islamweb

ويصلى على قاتل نفسه

The funeral prayer is offered for someone who kills himself.

Al-Risalah by Ibn Abi Zayd from Shamela

وأجمع ا ى مون مون ى ى ل. ترك والحمد لله. واتفق العلماء على ذلك إلا في الشهيد كما تقدم; وإلا في أهل البدع والبغاة

And the Muslims agree that it is not valid to refuse the funeral of a Muslim, be they those who have committed grave sins or are righteous, and this is proven by the sayings and actions of the Prophet. Praise be to Allah. And the ulema agree on this, with the exception of the case of a martyr, innovator (Ahle Biddah), and rebels.

Tafsir Qurtubi from Qurtubi from Quran.ksu.edu.sa

قال الحسن والنخعي وقتادة ومالك وأبو حنيفة والشافعي وجماهير العلماء: يصلى عليه

The saying of Hasan, Nakhni, Katada, Malik, Abu Hanifa, Shafi and the majority of the ulema is: The funeral prayer is offered for him (one who kills himself).

Sharah Sahih Muslim from Nawawi from library.islamweb