Whitman was slightly closer to Lincoln than "just ... a citizen": according to David S. Reynolds in the Journal of the Gilder Lehrman Institute of American History, he had a nodding acquaintance with the President (emphasis mine):
On February 19, 1861, Whitman was among a throng of curious spectators in New York City who saw the president-elect arriving at the Astor House Hotel during his stopover in the city on his trip from Springfield to Washington, DC. During the war, when Whitman was a government worker and volunteer hospital nurse in Washington, he saw Lincoln some twenty to thirty times. He didn't meet the President, but spotted him riding through the city for business or pleasure. "I see the President almost every day," he wrote in the summer of 1863. "We have got so that we exchange bows, and very cordial ones." Once Lincoln gave Whitman a long friendly stare. "He has a face like a Hoosier Michel Angelo," Whitman wrote, "so awful ugly it becomes beautiful, with its strange mouth, its deep cut, criss-cross lines, and its doughnut complexion."
That suggests to me that the speaker in that poem is Whitman himself. Reynolds appears to share this view (emphasis mine):
In Whitman’s best-known poems about Lincoln, "O Captain! My Captain!" and "When Lilacs Last in the Dooryard Bloom'd," the silencing of his former poetic self is noticeable. Both poems marginalize Whitman and concentrate on Lincoln, presaging the poet's obsession with Lincoln in late years. In "O Captain!" the fixation is visible in the image of the "I" staring relentlessly at Lincoln's bloody, pale corpse on the ship of state's deck amid celebrations heralding the ship’s return to port. In "Lilacs," Lincoln is the majestic western star, while the poet is the wood thrush, the "shy and hidden bird" singing of death with a "bleeding throat." No longer does Whitman's brash "I" present himself as the Answerer or arouse readers with a "barbaric yawp." In the war and Lincoln, many of the nation's most pressing problems had reached painful resolution, changing the poet's role from that of America's imaginary leader to that of eulogist of its actual leader.