Firstly, yes, if a spell requires an attack, that attack still counts as an attack.
So, what you have to remember is the "specific beats general" rule. This is detailed on page 7 of the PHB. The core of the rule is:
If a specific rule contradicts a general rule, the specific rule wins.
So the general rule here is that familiars can't attack. There are 2 exceptions to this general rule:
A familiar can deliver spells with a range of touch on your behalf, even if the spell requires an attack roll.
A Warlock with the Pact of the Chain can forgo one of their attacks to let their familiar make one.
So when you cast a spell with a range of touch, you can have your familiar do the actual "touching" on your behalf. You cast the spell as normal using whatever actions it requires. The familiar is required to use their reaction, and if the spell requires an attack roll, it makes the attack roll. Since it uses your modifier anyway, it's exactly the same as you making the attack roll except that you don't have to stand next to what you're casting the spell on.
In the case of a Warlock with the Pact of the Chain, the Warlock takes the Attack action as usual, then has the familiar do the actual attack. The errata for the PHB says:
When you
let your familiar attack, it does so with its
reaction.
If the Warlock can make multiple attacks with the Attack action, the familiar can use its reaction to replace one of them with its own attack, then the Warlock makes the rest.
Finally, only spells with a range of touch can be delivered by your familiar. There is no option for having your familiar cast a spell on your behalf, and the option for allowing a familiar to attack instead of yourself specifically says "when you take the Attack action", not just "when you make an attack".
You are correct; the Sharpshooter does not affect spell attacks.
The description of the eldritch blast cantrip states that you “Make a ranged spell attack”; it does not involve a weapon or a weapon attack at all.
Therefore, it is not affected by the benefits of the Sharpshooter feat (PHB, p. 170) - the first two of which apply to "ranged weapon attacks", and the last of which applies to "an attack with a ranged weapon that you are proficient with".
Best Answer
Mechanically, it works on any of your attack rolls.
The description poses no restrictions except that the attack must be yours. Melee, ranged, and spell attacks are affected. Other creatures are not affected, i.e. a monster's attack roll can never be affected unless the monster is the amulet's wearer for some reason. Also, not all damaging spells let you make an attack roll. Those that do, say so.
Lorewise, Mechanus's laws are all-encompassing.
The lore on Mechanus (DMG p. 66, and description of Modrons MM p. 224) state multiple times that it is a plane of absolute law and order. There is also no specific reason why spell attacks would be unaffected and the descriptions suggest that the rules of Mechanus do not include arbitrary exceptions. As as aside, the amulet's effect is an adaptation of the Law of Averages (DMG p. 66) which now applies to attack rolls instead of damage rolls. The description of the Law of Averages also specifically includes spell damage.