
Seppuku is a ritualized and institutionalized form of suicide among the Samurai in Feudal Japan, performed by plunging a sword into your stomach and disemboweling yourself.
It was fundamentally an “honorable” way to commit suicide when you would otherwise be killed, not some random act done based on minor embarrassment.
Samurai would do it rather than be captured by a hostile force or after being convicted of very serious crimes. Sometimes it would be a requirement for a peace treaty and basically replaced killing the leader of the losing faction.