Submarine disasters are definitely one of those morbid fascination things that I can find myself going down wiki holes about from time to time (along with plane crashes and mountineering disasters).
The one that sticks in my mind the most was
HMS Thetis which half-sank on trials (one end flooded and hit the seabed, the other end was still on the surface); it was possible to leave via an escape chamber but the chamber needed to be flooded to equalize pressure with the outside water, and only one person could use the chamber at a time. The first four men managed to get out, but the fifth panicked and drowned which left the chamber stuck half open and inoperative. There were still 99 people left in the submarine and they all suffocated to death.
The sub was salvaged and repaired (imagine being the ones to open that thing up...) and went into service in WWII where it was sank again with all hands lost. Incidentally a detail I hadn't read before (just rereading the wiki article) was when it sank the first time (a few months before the start of WWII) one of the letters of condolence received was from Hitler, lol.