What Pimp said.
This is a "normal" thing on a huge map at higher difficulty levels. End-game happiness management is crucial.
I think the people that are saying your situation is "impossible" aren't playing on larger maps. You can have a fairly modest empire city-count (for a huge map), with the standard handful of "core" cities, do everything right, and still be up against the wall vis a vis happiness, especially during wars where you have an occasional city resisting and a substantial portion of your army too busy to garrison.
They key is the puppets. At a higher end-game population level, the ability to use specialists to reduce your morale hit is very significant. Puppet cities won't typically use their specialist slots. Even if you're doing everything right and have given up Rationalism for Theocracy, they'll hurt you. They also "lag" in building morale structures, they'll build them - but often only after you're in negative morale.
Then, taking one city will put you under the magic "-10" happy, albeit temporarily.
Annexing a puppet and building a courthouse gives you +1 immediately, then +(x/2) where "x" is the number of specialists you put to work. And you can either rush-buy or build any remaining morale structures.The problem with annexing puppets though, is that you'll quickly give up any chance of getting new policies. (This is true even if you quickly build up through Broadcast Tower in the annexed cities, because they won't have the single wonder giving them the +100% culture from the "Constitution" policy that your core cities
should have. There are just a limited number of wonders, and none in the end-game.)
The only real answer is razing, if you want to keep your ability to acquire new policies and still grow all your core cities to "optimal" size, ie, around 35. And then, guess what - you have to deal with whatever friends you have left at this point sneaking settlers into the blank spots.
Again, this is a common problem for those who just "play to play". By this point the game is won unless you're actively avoiding it. But that's my standard play style. (And before one of you guys start calling shenanigans on me, I've got (checking...) 2,395 hours of Civ V played and I'm a game programmer, I've played dozens of games at Immortal on huge/marathon, trust me I'm doing it right.)
Edit: oh, wait - another solution is a nuclear exchange, but that's "bad".