As for God favoring one side over the other, you're familiar with this passage from the Book of Joshua.
Just outside Jericho, Joshua saw a man with a sword drawn in his hand.
"Are you for us or for our enemies? " Joshua asked.
"Neither, " came the reply, "I am here as Captain of the Host of the Lord."
Then came the command for Joshua to remove his shoes, for he was standing on holy ground.
As for God's control over events, we have Joseph's statement from Genesis 50:20 --
"As for you, you meant evil against me, but God meant it for good in order to bring about this present result, to preserve many people alive."
Many Confederate leaders believed absolutely in God's Providence. Scripture contains much more along these lines, but I'll forbear unless anyone cares for other relevant passages.