I have no "lost cause" hangups. It was always a lost cause. It was a stupid war that the south could never win.
When the casualty reports for Shiloh began to filter in, Northern citizens were appalled. A significant percentage of Northerners just wanted the damn thing to stop by the summer of 1862. The draft caused rioting in New York.
The South had two armies positioned on either side of Grant's western army as of the spring of 1863. Johnston was to his east in Jackson, while Pemberton was heavily dug in to his west in Vicksburg. Grant knew that if the two armies joined up, he would be defeated so he moved east very quickly and badly hurt Johnston's army. Yes, yes, I know, if if's and but's were candies and nuts ...
If Pemberton had figured out that he was not going to win by holing up in Vicksburg, and that if his supply line via the Mississippi River was cut off, and if he had simply gone after Grant the minute he received word it was moving east, then he and Johnston would have put Grant's and Sherman's armies in a vice. Pemberton was simply unwilling to take his men out of the heavy fortifications, since remaining holed up in Vicksburg would not get him fired or killed.
At very close to the same time, Lee's Army of Northern Virginia enters Pennsylvania. For reasons that were never clear, J.E.B. Stuart, Lee's "eyes and ears," went gallivanting around Pennsylvania, depriving Lee of the best cavalary on the planet. Again, if if's and but's were candies and nuts ... if Stuart simply does his job, then Lee would have had notice of Meade's Army of the Potomac coming out to meet him and he would have selected the place of the conflict. Add in Stuart's 2500 experienced, armed cavalary, and the outcome is very different.
Even then, the vicious fight for Little Round Top and the indescribable will of the troops on both sides. If the Army of Northern Virginia takes Little Round Top early on, they have basically flanked the Union position on Cemetery Ridge. They place cannon on Little Round Top, even if the sight to Cemetery Ridge is not great at that point due to the trees. Even with a somewhat obstructed view of the Union position, the Army of Northern Virginia can bombard the Union left flank on Cemetery Ridge and imperil Meade's entire force. Meade has to abandon his position on Cemetery Ridge, the best defensive spot at Gettysburg.
Meade's famous "fishhook"
The 20th Maine holds off three, four, five assaults by the Alabama and Texas troops. Casualties are high. The contest was close. Stunningly close. If the Alabama and Texas troops, who had marched 20 miles that day to reach Gettysburg, had even 2 hours, 1 hour, to rest and re-fill canteens ... if Stuart was present to push the 20th Maine during the first assault ...
I submit that if the South had won EITHER the Vicksburg battle OR Gettysburg, the Northern population would have had enough. The result would have been a bit like what we saw about Vietnam, the Middle East conflicts. If the population does not support the war effort, and the political shills making decisions are worried more about the next election than the troops, then the war ends.
That was closer to occurring than we realize today. We read about the North's industrial might and obvious advantage in manpower. How the North simply overwhelmed the South. But Pemberton's decision to remain snug, while Stuart was 3 miles from Gettysburg for some reason, and the Southern troops could not get even 60 minutes to get some water, were the difference.