The ring of mystic fire only affects the upcoming spell once
The ring of mystic fire (Magic Item Compendium 125) (7,500 gp; 0 lbs.) does, indeed, grant "a bonus to the amount of damage you deal with the next fire spell you cast before the end of your turn," but the ring only grants that bonus once. Each ray of a scorching ray spell isn't the spell; instead, the whole spell creates multiple rays. The ring improves the spell's damage only once by a maximum of +4d6 no matter how many effects result from the ring-modified spell.
(Ruling that each ray of the scorching ray spell benefits from the ring multiplies the power of the ring by the number of rays—with rather extreme consequences at low levels, especially given that the ring increases also the wearer's caster level for fire spells!)
Although the DM has several options available to adjudicate the ring's effect—allowing the player to distribute the total number of extra dice damage the ring grants among the rays before (or even after) the rays're launched, for instance—, this DM would keep things simple and have the player add the extra damage to his PC's first ray in a volley from the spell scorching ray, in much the same way that precision damage applies to the first attack in a similar volley (Rules Compendium 42). (In fact, I have a fire wizard in a current campaign who's eyeing this very item, and that's how I'm ruling it works.)
Hence, for example, under such a ruling, a level 6 caster wearing a ring of mystic fire can take a swift action to spend 3 of the ring's charges. Then the caster can cast scorching ray, creating 2 rays (because of the increase in caster level granted by the ring) and making 2 ranged touch attacks. If the first ray hits, it deals 8d6 points of fire damage. If the second ray hits, it deals 4d6 points of fire damage.
The highest level spell I could find that uses a melee spell attack to deal damage is Mordenkainen's Sword (level 7). The relevant part of the spell reads:
When the sword appears, you make a melee spell attack against a target of your choice within 5 feet of the sword. On a hit. the target takes 3d10 force damage. Until the spell ends, you can use a bonus action on each of your turns to move the sword up to 20 feet to a spot you can see and repeat this attack against the same target or a different one.
However, it's worth noting that Plane Shift (level 7) requires a spell attack and a save to let you banish an enemy, which is equivalent to killing them most of the time:
You can use this spell to banish an unwilling creature to another plane. Choose a creature within your reach and make a melee spell Attack against it. On a hit, the creature must make a Charisma saving throw. If the creature fails the save, it is transported to a random location on the plane of existence you specify.
Otherwise, for a wizard, there aren't really spells that start at high level that require an attack roll.
Best Answer
Gain a bonus to one of the spell’s damage rolls.
The Arcane Firearm feature says:
Whether a spell requires you to roll damage once or multiple times, choose one of those times. Add the result from the d8 to that damage roll.
Scorching ray involves multiple separate damage rolls, once for each hit, so you would add the d8 only to one of those damage rolls (see this Q&A for more details on this point: How many times do you roll damage for Scorching Ray?).
You roll once for area-of-effect damage (and magic missile).
The rules for damage rolls say:
So you would add the result of Arcane Firearm's d8 roll to the damage dealt to all creatures within the area of effect of fireball as well as each dart from magic missile.