I was reading Andre Breton's "Anthology of Black Humor" and I found in one of the introductory notes a report addressing the theme of humor by Hegel. I think it is related to the treatment of comedy by Hegel and it is included in his work about Aesthetics. I have also read Freud's work "The Joke and Its Relation to the Unconscious" which i found very interesting. So the question is: What is the work of Hegel that includes this theme and what are other philosophers who have dealt with this issue? (comedy as an art form or humor in general)
Hegel writes about humour in "The Romantic Form of Art", which is Section 3 of Part 2 of his Lectures on Aesthetics. In particular you need Chapter 3, "The Formal Independence of Individual Characteristics", and inside that, section 3, "Dissolution of the Romantic Form of Art", subsection b, "Subjective Humour".
Bergson wrote a small, well-known book on humor, which I have not read. Simon Critchley wrote a book on humor, which I have but can't find at the moment. Zizek is well known for his interest in jokes. Aristotle wrote a lost work on comedy, which figures in "The Name of the Rose."
There may be something by Nelson Goodman, and I suspect humor is a likely topic for existentialists, from Kierkegaard to Sartre. (That would, of course, exclude all existentialists who are German, the only nation with no standup comedians and no logical "reason" for them.)
I'm not sure where the Hegel material is, probably you are right, in the aesthetics lectures. Hegel was famous, of course, for his incisive one-liners, reckless pranks, and jolly sense of humor. His students couldn't stop laughing. Actually, Hegel was, in a sense, fond of "puns" or words that did double duty, such as Aufhebung.