The war's unpopularity may well help Republicans in their bid to retain control of Congress, in at least some districts.
From early examples, the war's bad PR is driving moderate Republicans into Democratic primaries – which they win. After these defectors capture the moderate and conservative Democrats, Republicans will generally oppose them with a someone more conservative in the general election. The left will sit the election out; conservatives can be motivated to GOTV. There are more conservatives and right-centrists than there are left-centrists. (And even if the Republicans lose a close one or two, the guy who wins is still basically a Republican!)
I suspect we'll be seeing a fair number of elections skewed oddly by war politics.