Nick Cannon was "shaken to his core" and seriously questioned his value as an entertainer after NBC unleashed its fury on him, and that led him to the decision to quit "America's Got Talent."Sources familiar with the situation tell us, Nick was devastated when he learned the network was on the verge of firing him as host of 'AGT.' He looked at the long history of entertainers -- Johnny Carson, Jay Leno, David Letterman and many others -- who trashed their networks right on their shows, and the brass allowed it. Yet Nick went on Showtime, made a few "harmless comments about NBC," and he was threatened with termination.One example that hit home with Nick was Tracy Morgan, who made a comment during a show and suggested he might knife his son if he found out he was gay. NBC execs defended Morgan.We're told Nick started to question his own self-worth as an entertainer, thinking he was being treated differently from the others because he just wasn't that good.He also took into account losing his salary ... we've learned Nick has been pulling in around $4.5 million a season for 'AGT.'Nick, we're told, was in a terrible state after NBC went on the attack. One source says it was emotionally harder on him than dealing with his very serious medical problems, including Lupus.Cannon decided in the end he believed in himself and was undervalued by the network ... so he quit.