Your dwarf can commit suicide either by manual or automatic means. A manual suicide happens when the player issues the suicide command with "S" (not to be confused with the "S" puppy command). A dwarf will commit suicide automatically if he is too emo.
Committing suicide through either method greatly increases the chances that a dwarf's offspring will be star-crossed, emo, or unlucky. Players looking to legacy-game an ideal starting character but who do not want to wait for the current character to die in battle usually avoid committing suicide and prefer to woo and mate with the Black Widow She-Dwarf.