Once it becomes a shooting war, niceties like public opinion don't matter any more. If it looks like the Americans are going to attack, it's entirely reasonable to strike first. Of course a lot does depend on what the American buildup looks like, and I suspect that it won't be fast enough and big enough to make that much of a difference.
Also, Americans don't feel guilt.
Public opinion is the only thing that matters in modern times. Nowadays, big wars always end in some kind of negotiation. So, its very important that the other side fights not in anger, but because of some interest. That way, they will be more ready to make concessions and end the war in some kind of deal. Compare that with WW2, where the demand was unconditional surrender, which made any kind of deal impossible.
In WW1, both Germany and Russia lost because the public got too fed up and started a revolution that changed government and that government sued for peace. I am sure CCP doesn't want that to happen to them.
So, its better that Chinese public is angry in the fight and has the desire and resolve to go all the way without backing down. On the other hand, its preferable for China that US public doesn't have the same resolve and is willing to give up major concessions to end the war quickly.