As a historian and Lincoln scholar, I'm glad to address the topic. (This being the DataLounge, who cares, right?)
Put simply, we don't know. But my strong sense is that Lincoln was, emotionally, a gay man enculturated strongly enough to live as a bisexual and a married man, with some time out.
It is not true that "homosexuality as we understand it did not exist at the time." Tell that to Walt Whitman. Gay cruising, gay cruise sites (bars, parks, particular streets), tricking, relationship and the rest were well established.
In some ways, 19th century values were less constrained than ours, in that toleration for intense, quasi-romantic same-sex friendships, presuming some measure of physical intimacy was widespread. This tolerance fell into the realm of "none of our business" and "not something to discuss." Respect for privacy, even in a gossip-loving time, was strong. And men were men.
At the same time, social mores were so predominant and gay life-partnering was so unusual that gay tendencies largely were subsumed in marriage with women (the same with gay women, who had even fewer options) and family life. Men had their outlets, but once married the need for discretion, with less options for hooking up outside established relationships, had its effect.
Traditional marriage therefore was usually considered a given for a man wanting to establish himself and pursue a career. Just like the recent past. James Buchanan was extremely unusual in never marrying; note, though, that despite the flippant sissy talk about him and his partner William Rufus King, he navigated in social and diplomatic settings quite well.
Lincoln's friendships prior to Speed are not well documented. The Lincoln mythology long ago sealed off details of the early life beyond the familiar legends. The impression is one of a loner, a young man who remained aloof while giving every appearance of being smart, normal and engaged in the usual pastimes. He always stood apart.
Lincoln did travel to New Orleans at least once, and seems to have had experience with female prostitutes there. He also probably contracted venereal disease in his younger days, likely from a prostitute.
Lincoln also appears to have enjoyed, well into his adulthood, "camping trips" arranged as commercial travel ventures. These group camping trips, for which men would sign up, offered an opportunity for men - either friends or strangers - to meet and spend private time together, under literal cover of darkness.
Lincoln's relationship with Speed was intimate and physically close. Comments already made about sleeping arrangements are true. Bed sharing was common and not inherently sexual. However, Speed and Lincoln shared a very close life. I believe it likely that their intimacy extended to sexual experience. Speed appears to have been Lincoln's first intimate adult relationship. Lincoln fell apart after Speed's marriage, and nearly fell apart as his own approached. Speed and his wife saw him through. Lincoln's letter to Speed at the time is clear about his underlying issues.
Lincoln was attracted to Mary - her personality, status. He needed a wife. With Mary he did very well. They had a strong sexual relationship until the Tad's birth, but Mary's health slowed things down. Lincoln was 44 at that time. Again, Lincoln was enculturated, and he did not find sex with women impossible. Obviously.
But all through his life Lincoln had long separations from his family - riding the circuit, serving his second year in Congress. His was a man's world. He enjoyed men in a way he did not enjoy women. Aligning with his times, he belittled women, abhorred their intrusion into "men's business," even as Mary was the most "intrusive" woman of her day. I expect that Lincoln found comfort with men during his absences. He didn't chase women.
Even in the White House Lincoln found cause to get away. His time at the Soldier's Home cottage has been noted. He did arrange for men - soldiers/guards - to stay with him and to sleep with him. Other arrangements were available. Proof? No. But….