How to politely tell a colleague they won't be an author of my article?
TLDR: Unless explicitly discussed otherwise, your friend does not expect to be a co-author. Just write a friendly email thanking them for the discussions and asking them if it is ok to include them in the acknowledgements.
As pointed out in the comments, this highly depends on which field we're talking about. In some fields, even pointing in a direction that actually turned out to be right might only be worth an acknowledgement (probably specific though, &quot;we thank X for point to the results published in &lt;obscure jounal 60 years ago&gt;&quot;). Since this is clear to most people, based on the information you provided, I would not think that your friend even expects to be co-author at all (unless they explicitly asked to be co-author, which would be border-line in terms of academic integrity but happens when the person urgently needs another co-authorship for formal reasons - in that case, however, one would expect that person to (a) communicate this clearly beforehand and (b) do much of the mindless busy-work, e.g. beautification of images).
That being said, I would assume that your friend knows they're not going to be co-author and thank them by email for the interesting, albeit ultimately fruitless discussions (but hey, maybe we can explore this in the future,...) and ask them if they agree to be mentioned in the acknowledgements. In other words, put a positive spin on it.