Makaylee C. answered 05/22/19
English and Reading Tutor
So, to answer this, you need a general understanding of the history behind Whitman and Lincoln's relationship. Whitman was, at one point during the Civil War, a government worker and volunteer nurse. It was during this time that he would meet with Lincoln numerous times and become an acquaintance of the president. In some of Whitman's personal writings, he mentions how he sees Lincoln almost every day, actually.
With this in mind, it would suggest that the speaker in "O Captain! My Captain!" is Whitman himself, mourning the loss of someone he knew well.