My spreadsheet has an Eldritch Blast warlock getting 24.8 DPR at level 11.
Meanwhile, a Champion using a longbow at level 11 gets 26.9 DPR, and a Battle Master (using a fairly abstract set of maneuvers) gets 27.3 DPR. If the fighter picks up Great Weapon Master (the bonus damage for heavy weapons isn't restricted to melee), that goes up to 30.8 and 31.2 for the Champion and Battle Master, respectively.
Sharpshooter doesn't affect damage, but gets rid of a lot of penalties (disadvantage for distance, cover, disadvantage for firing in melee), so isn't relevant for these purposes.
Overall, the longbow is mildly better than Eldritch Blast for damage, by between 2 and 6 DPR. Repelling Blast provides a bit more utility than the Slow weapon mastery that longbow gets by default, but fighter could swap the weapon mastery to Push to make them equivalent. Overall, very similar.
Remember the more attacks you get the more that difference in damage adds up together.
This was Treantmonk's analysis for a bladelock using a longbow instead of EB at 13th level, which does not include a subclass yet:
Ranged: Longbow (moontouched or whatever, assumes no magic bonus to hit and damage just base 1d8+5 damage). Includes Slow Mastery, which is nice but not changing DPR calculation.
Rd 1 Bonus Action: Hex (same as baseline attack)
Attack #1 1d8+5
1d6 Lifedrinker
1d6 Hex
Total average damage for a hit = 16.5
60% chance to hit = 9.9 average damage
5% chance to crit (Eldritch Smite used on Crits) 89.5 damage on crit = 4.48 average [BUT SEE BELOW]
Attack #1 total average damage: 14.38
Attack #2 total average damage: 14.38
Attack #3 total average damage: 14.38
Great Weapon Master (Applies proficiency bonus to damage once per round - and yes, it now applies to a longbow too): Chance of hitting at least once with 3 attacks = 94% x 5 (proficiency bonus) = 4.7 damage average per round.
Total Damage Per Round: 47.84 average (14.38 + 14.38 + 14.38 + 4.7), which is
79% more than Eldritch Blast with Agonizing Blast and Hex.
Now Eldritch Smite can use more spell slots. So lets assume for this one you never took Eldritch Smite and that big boost on crits goes away. Crits are now 5% x 12.5 = 0.63. New total is 36.59,
which is still 37% more than Eldritch Blast + Agonizing Blast + Hex. And you're Slowing Target (Weapon Mastery) rather than pushing Target (Repelling Blast). And getting more range from longbow than Eldritch Blast. Bottom Line: why use Eldritch Blast anymore when this does a lot more damage for just one more invocation involved really?