Nothing happens, and no spell slots are consumed (unless Bob the Warlock is standing outside the field and trying to attack something inside it)
As explored in this question, we know how to tell if an ability is magical based on some guidelines set out in Sage Advice. In this case, the Eldritch Smite is definitely capital-M Magic because it is fuelled by the use of a spell slot. Therefore, Eldritch Smite won't work in an antimagic field.
As for the use of the spell slot, the general description of the antimagic field clarifies that:
Within the sphere, spells can't be cast, summoned creatures disappear, and even magic items become mundane.
Within the field, "spells can't be cast", which would mean that the slots aren't used up - it's simply impossible to even try to cast a spell. I would judge that, although not explicitly clarified, the same rule should extend to abilities powered by spending spell slots that aren't actually spells themselves - if Bob tried to perform an Eldritch Smite, it just doesn't work and his slots remain unspent.
The description also goes on to say:
Spells and other magical effects, except those created by an artifact or a deity, are suppressed in the sphere and can't protrude into it. A slot expended to cast a suppressed spell is consumed. While an effect is suppressed, it doesn't function, but the time it spends suppressed counts against its duration.
However, this is basically only noting that spells can be cast from outside the sphere into its area, but those spells are suppressed and inactive within the field's area of effect. A caster outside the field still uses up their spell slot when they try to produce an effect inside the field.
The end result is that while Bob stands inside the antimagic field, he can't use Eldritch Smite at all. If Bob is standing just outside the antimagic field, however, and tries to perform an Eldritch Smite on a target in the field, the target is immune to the effect (as a magical effect can't penetrate the field) but Bob is not prevented from trying, so he would waste his spell slot in this case.