This is highly speculative, but I think it is a possibility nonetheless:
When Harry uses Felix Felicis in chapter of Half-Blood Prince its effect is described as follows:
Harry did not answer for a moment. Then, slowly but surely, an exhilarating sense of infinite opportunity stole through him; he felt as though he could have done anything, anything at all... and getting the memory from Slughorn seemed suddenly not only possible, but positively easy....
He got to his feet, smiling, brimming with confidence.
Note the phrases that I emphasized. Felix Felicis doesn't only make you lucky. It also makes you feel confident, and able to do things you hitherto would have never thought yourself capable of.
We know that Slughorn has a stash of Felix Felicis because there was an entire cauldron (albeit a small one) of it in the class when he gave Harry some as a prize, in chapter 10 of Half-Blood Prince, and the prize was in a separate bottle:
"Sir, you haven't told us what's in this one," said Ernie Macmillan, pointing at a small black cauldron standing on Slughorn's desk. The potion within was splashing about merrily; it was the color of molten gold, and large drops were leaping like goldfish above the surface, though not a particle had spilled.
"And that," said Slughorn, apparently coming back to earth, "is what I shall be offering as a prize in this lesson."
There was silence in which every bubble and gurgle of the surrounding potions seemed magnified tenfold.
"One tiny bottle of Felix Felicis," said Slughorn, taking a minuscule glass bottle with a cork in it out of his pocket and showing it to them all. "Enough for twelve hours' luck. From dawn till dusk, you will be lucky in everything you attempt."
Assuming that Slughorn was telling the truth, he has actually used Felix Felicis in the past, and so he would be experientially familiar with its effects:
"Have you ever taken it, sir?" asked Michael Corner with great interest.
"Twice in my life," said Slughorn. "Once when I was twenty-four, once when I was fifty-seven. Two tablespoonfuls taken with breakfast. Two perfect days."
So getting back to the duel against Voldemort, we have Slughorn who knows that he would be too afraid to challenge Voldemort, and he also knows that a bit of Felix Felicis can help him overcome that fear, and he also happens to have a stash of Felix Felicis lying around for him to use on a special occasion.
Putting this all together, the answer may simply be that Slughorn used Felix Felicis to give himself the courage to fight Voldemort.