Well, you're closer to the mark, as at least your new thesis hits in the realm of what is rational or not, but you're still way off. You're just taking a conclusion that you want to find, that these wars have been based on emotions, and framing the conflicts in those terms while ignoring everything else. Of course, all humans feel emotions like fear and hope, but that doesn't mean their decisions are solely or even primarily based on them. After all, is that how you live your life? You get angry so you punch someone, you feel fear so you refuse to push forward, or you feel hope so you take a blind leap of faith? Of course not! And doubly so if you were running a country.
You say the Confederates went to war knowing they couldn't win, solely because they were "frightened that they would lose their economic base". They absolutely thought they could win, but more importantly, they thought trying to win was their best path forward because without slavery they thought they were doomed. Yes, they feared a future without slavery, but it was their belief that their right to own slaves was so essential to their future that they had to fight for it that caused them to act, not fear alone. A rational decision that was well thought out, heavily debated, and decided soberly by many states' independent governments... not a conclusion that was rushed to in a panic of fear.
The German Empire didn't choose to go to war, they chose to back their ally Austria-Hungary. Austria-Hungary chose to go to war because they wanted to crush the Serbian nationalists who killed the heir to their thrown. Basically every other country who fought in the war did so because they had alliances that demanded they do so. All quite rational.
WW2, as you mentioned, was largely because Hitler wanted Lebensraum. That is as rational as it gets, as he thought (correctly) it was an achievable goal that would be the best path forward for the country. Later, the Germans overestimated their capability with respect to Russia, and that led to their demise, but as Brett mentioned, that is irrelevant to any discussion over who is acting as a "rational actor".