DMing is tough, I've always been the one to have to do it and even I have a lot of problems with it, although those tend to be moreso when I play with rules whores.

Let's see, you are 7th level which means you can cast up to 4th level spells.

From the 4th level spell list, (Evard's) Black Tentacles is a nice way to go. Have him charge in and then use the Black Tentacles. They then grapple EVERYTHING in the area, including Mr. Gung Ho Ranger. They do a good amount of damage, but you start flinging blast spells around you should kill everything else long before he dies, allowing you to dismiss the spell and have the healer patch him up. A good admonishment here is to not get in your way.

Against a low-Will low-Fortitude type like say a Rogue enemy, Phantasmal Killer can kill it immediately, before Stabby Mctwink gets a chance.

There's also Polymorph. However, that spell's so hideously broken I suggest not inflicting it upon your poor DM except for extreme cases. There are plenty of 7 Hit Dice nasties that can tear through a mob far easier than any warrior.

From the level 3 spell list, Deep Slumber or Hold Person can take people out of the battle entirely. This still, however, allows him to brag about killing them, even if they are asleep/utterly paralyzed when he does so, due to your spell. Feel free to point it out to him though.

Those are just a few things you can do. I definitely encourage putting such players in their place, I would hate playing with someone like that and I'm still unsure of how he managed to "twink" a Ranger, since they're often considered to be more than a little nerfed mechanically, especially in pure combat situations. Especially if he's going two-weapon fighting.