From Sahih Bukhari (Hadith 3463):
Narrated Jundub:Allah's Messenger (ﷺ) said, "Amongst the nations before you there was a man who got a wound, and growing impatient (with its pain), he took a knife and cut his hand with it and the blood did not stop till he died. Allah said, 'My Slave hurried to bring death upon himself so I have forbidden him (to enter) Paradise
Reference: Bukhari 3463