All serious books, and deep, dark books have a comedy relief line or 2 thrown in throughout the story. Even Lord of the Rings has a comedy relief line thrown in here and there after a tense scene. That's the key though... AFTER a heavy scene to help lighten the reader. If you constantly throw dark, heavy things at readers, only a masochist would keep reading.
So that leads us to the next problem... how much is too much? If you feel it's too much then it probably is. Every story has a character that is the "comedy" or tension cutter. But it needs to be used appropriately. Too much will get annoying yes, but also used in the wrong place/time can also be off putting.
If you have a scene where people are arguing or someone just died, then follow it up with something funny (and appropriately follows the scene don't just throw in a random comedy line for the sake of it). Often you can see this done when someone dies and people are very sad about it, that it is usually followed by, a:
Hey... remember when bob did this? OMG RIGHT? he was being such a
dork... ahahaha, yea and that one time he did that? oh man we never
let him live that down.
keep it in taste to what is going on, it is okay to have comedy... but if you want to write a serious book, the comedy needs to be well placed.