If I'm playing as a Warlock and I take the Pact of the Blade, and then take the Thirsting Blade invocation (which allows me to make two melee attacks with my pact weapon), can I cast vampiric touch on myself to grant both of my melee attacks the extra 3d6 necrotic damage, or did I misunderstand the spell completely?
No, you can't improve Thirsting Blade with Vampiric Touch
Thirsting Blade is a Warlock's counterpart of the Extra Attack feature:
You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn.
Vampiric Touch is a spell involving a spell attack:
The touch of your shadow-wreathed hand can siphon life force from others to heal your wounds. Make a melee spell attack against a creature within your reach. On a hit, the target takes 3d6 necrotic damage, and you regain hit points equal to half the amount of necrotic damage dealt. Until the spell ends, you can make the attack again on each of your turns as an action.
When you cast Vampiric Touch, firstly you take the Cast A Spell action and expend a 3rd level spell slot. Then you deal 3d6 and only 3d6 necrotic damage, if you succeed with the melee spell attack. This melee spell attack is a part of the spell — you literally have to touch the target with "your shadow-wreathed hand" to apply the spell effect.
Within 1 minute, you can repeat this action without expending more spell slots, providing you maintain the concentration. This requires an Action. So you have to choose — either you make two weapon attacks with your pact weapon (second one because of the Thirsting Blade invocation), or you make one spell attack with Vampiric Touch.
5e is quite restrictive regarding damage output. For instance, you can't stack Thirsting Blade with Extra Attack, if you have the latter from multiclassing:
the warlock's eldritch invocation Thirsting Blade doesn't give you additional attacks if you also have Extra Attack
There are methods of increasing the Vampiric Touch damage output, but they are based on increasing of number of actions, not just number of attacks being made.