For me, and I suspect for lots of other people too, bad things actually sometimes make you think more about faith and the fact that you're not facing these things on your own.
I think my knowledge of music theory is rooted in jazz theory, and a lot of the writers of standards - Rodgers and Hart, and Gershwin.