You want a warlock that can handle melee? There are a few builds I may suggest with this in mind...
Dwarf Fighter 2/Warlock 18: Provides you a solid base if you take the fighter levels first with an easier chance to hit early in the game, better HP, and bonus feats. If you pump Str, Dex, and Con, take the the Hideous Blow invocation as a warlock, and use a 2-handed weapon, you will be set. Warlocks take a chance of casting failure with shields, so getting a high strength and using 2 weapons is key with this. Using Hideous blow when entering combat will allow you to channel your Eldritch blast damage into your next strike when hitting a target in melee. By the end of the game, you will end up with 3 attacks in a full attack action, with a +8d6 magic damage to the first attack if you take a round to use hideous blow and move towards the target, then attack the next. You would be smart to take the Improved Initiative feat as one of your Fighter Bonus feats with this one. Hitting before the enemy helps to keep you alive. Even if you do not kill them in the first round, you may in the second before they get to hit you a second time. Taking Battle Caster will allow you to use Medium armor.
Half-Orc Barbarian 2/Warlock: More Hit Points, Faster Movement, Uncanny Dodge (keep your Dexterity Bonus to AC in most conditions excepting rogues attacking), and Rage (+2 to Str and Con,-2 AC temporary) with warlock abilities. What you can't kill long range with your blast will be torn apart with a 2-handed weapon like a greataxe and rage with hideous blow. Battle Caster feat lets you use medium armor, and you can still use your fast movement in medium armor.
Drow Rogue 1/ Warlock: Taking Rogue 1st level lets you have a ton of skill points right off. Spreading these out will make it easy on you in various situations in the beginning of the game (disable device, open lock, appraise, diplimacy, hide, move silently, Tumble, Use Magic Device). Sneak attack won't seem as important later in the game, but early on, it will help you if you move behind a target that one of your other party members is fighting. You will deal extra damage, and if you move within 30ft (hard to judge in game, but stay close) you SHOULD still get sneak attack damage with your eldritch blast. The Drow Race provides a number of bonuses, most notably a bonus to Dex, Int and Cha, all useful in your build. As well as Darkvision and Spell Resistance. You WILL level more slowly, but enemy spellcasters will be unlikely to harm you. If they do, they will be lucky, making your only threats being from melee or ranged combat. Keep your Dex high, and get a Mithril Breastplate or Chainmail as soon as you can. Keeping Use Magic Device high will allow you to use healing and offensive scrolls/wands/staves you find. As well as most other magic items you find. Use them if the rest of your party can't use them better. Especially if you have a high Wis and you find monk only items and can use them. That monk only bonus to AC is highly useful when you find monk only items.
Warlock 6/Rogue 14: This build centers on the warlock being support for your rogue skills. Imagine the killer that can fire a blast to render his target blind, then run forward to stab him and drop him dead. This is the build! Use the following:
Invocations necessary:
Least-
*Entropic Warding: Great For Rogues. Not a very long duration, but with 6 levels, it should work to get you into a place to sneak attack mages and the like with your hideous blast already set up before sneaking in. Provides protection from ranged attacks and bonuses to move silently in this game. Good stuff
*Leaps and Bounds: Best buff in the game for rogues. Bonus to Dex and Tumble for 24 hours? AWESOME stuff
*Hideous Blow (activate before firing blast to blind opponent)
Lesser:
*Beshadowed Blast (use with eldritch blast from a distance. If they fail their save [Charisma dependant save, keep Charisma high!] they are blinded for 1 round, which causes them to be flat-footed and you can make sneak attacks on them
Use these with weapon finesse on a High Dexterity character and a rapier, dagger, shortsword, etc and you will be right in business. Except against enemies like undead and constructs. Which will mean you will need that eldrictch blast and hideous blow to damage them, negating the standard rogue crippling that happens. Now, you can effect anything besides golems with your warlock levels! Happy day! It is slow going, but side from the speed factor with my sneaking around and stabbing everything from behind I had a lot of fun with this build until I stopped playing.
I never went far into the game though, haven't gotten past chapter 1 yet so far. Still, from what I have read, so long as you have either a cleric and wizard or fighter and cleric as your other party members you should do well playing intelligently with this build. Good stuff there.
Please excuse the messy run-on paragraphs. It is late, I worked a long day today.