I doubt the Emperor signed it without any thought. Have you ever been in a position of power and had to make a difficult decision like that? I'm going to answer it for you. No. It's easy to be a commoner and sit back and judge a leader, but for once, see it from their perspective. You might learn something. For your sake, I hope you do.
Maybe that was his problem, he thought too much and didn't go with what his gut told him and made a costly mistake by essentially bowing down to the Thalmor temporarily while trying to regroup, while his signing of the treaty was the beginning of the Thalmor's grand scheme of breaking down relations between the empire and other provinces in all of Tamriel.
As much as POS the Thalmor are, they're some smart cookies, you don't even ponder that maybe they
knew that certain groups within or supporting the empire would be apalled, disgusted and want
nothing to do with this treaty??? Banning talos for instance, Thalmor thoughts: "Those proud and arrogant nords won't hold true to this treaty and sooner or later will rebel against the empire due to their rash foolishness" Sounds like a legit plan of the Thalmor's to me, I'm just makin my own assumptions of course but you can't fully disagree that that wouldn't have been on the Thalmor's minds during all this. Remember, their like the NWO, they're 5 steps ahead of the rest and Everything they do is planned and thought out and the glorious Empire and the foolish Ulfric and his SC's fell into their scheme perfectly. It's also easy for an Emperor to sit in his castle (temporarily, until the Thalmor step back in) and try and
think and do whats right for 'the people' uhhh oh wait no its not thats why they're all in this mess and people are dying in the name of the WGC. Also, the Emperor isn't a dumb man as seen at the end of the DB questline and has no trouble accepting his fate, maybe he just signed the treaty to enjoy his plush life as Emperor in his castle a few more days before the Thalmor decide to strike back.