Both Abraham Lincoln and Robert E. Lee are writing these works in the midst of the Civil War, so it is not surprising that they each express their views about that war in their writing.
It is clear from Lee's letter to his son that, while he believes in the Constitution and wants to preserve the Union, he has a stronger loyalty to his home state, Virginia. He is willing to fight, even against the soldiers he once called brothers, for that cause. This is his personal belief, and he acts accordingly throughout the war.
Lincoln, too, respects the Constitution (he quotes from it in this speech) and wants to preserve the Union. The difference is that Lincoln's loyalties, as President and as a man, are to the preservation of the Union. He is not certain the nation can endure this testing (the war) and expresses his sorrow (by the use of sacred language such as "consecrate" and "hallow") for the losses this speech commemorates. He believes that "it is for us the living...to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced."
Both Lincoln an Lee are men of conviction, and each expresses his views in his writings; they share several of the same views, though each man acts according to his own conscience in the matter of the Civil War.