A tragic comedy (or a comic tragedy) is a genre where the plot is more suited to a tragedy, but it is heavily ironic or satirical or uses black comedy. Perhaps the earliest startings of it began with Greek drama in the 6th century, where an annual content would be held in Athens once a year and the two categories were comedy or tragedy. It was unavoidable that the two would mix.
Tragic comedies usually involve complex plots, characters with exaggerated personalities, and a plot twist at the end. Some excellent examples include: Catch-22, "Orestes", "The Frogs", Pulp Fiction, and Memento.