You can use your Eldritch Blast cantrip create a shimmering melee pact weapon in your empty hand of eldritch power rather than the usual blast. You can choose the form that this melee weapon takes each time you create it. You can attack with this weapon by making a melee spell attack against a target in reach. This weapon counts as magical for the purpose of overcoming resistance and immunity to non-magical attacks and damage and the damage for this weapon is 1d8, no matter what form it takes. Your pact weapon disappears if it is not in your grasp and must be created anew. You can also use an action to dismiss the weapon, or it disappears if you die or fall unconscious. You cannot use the Eldritch Blast cantrip while you have your pact weapon, but each time you would get another bolt with Eldritch Blast, you can make an addition melee spell attack with the pact weapon as part of your action.
Invocations that affect Eldritch Blast, also affect your one of your attacks per round with the pact weapon. Agonizing Blast adds your charisma modifier to damage with pact weapon, Eldritch Spear extends the reach of your pact weapon by 5', Repelling blast can push a target you hit 10', etc.