hmm, I play wizards almost exclusively, I am currently playing my first wizard with less than a 10 str, and he has an 8 (we use point buy, so 8 is as low as it can go) Thanks to spells like Shield, Mage Armor, Cat's Grace (not too good untell 5th+ level when it lasts longer, but even 2-3 hours is good if you rest after that) my AC is usually the best in the party. I may not have the best attack bonus, but I do move into melee range to knock some heads together (well to give the fighter a flanking bonus) and toss off a few spells that are either touch attacks or use me as a point of origine (spelled wrong, sorry)
I have played a wizard (elf with longsword) who started at level 1, and played to level 15, that entered Melee combat almost every fight, and swung his sword, and hit stuff. At very low levels you have a disadvantage, but your AC meens that you are never hit, at mid levels you are still rarely hit, and when you are it is most often a mirror image. You can cast bull strength on yourself, use a bow (with your moderate dex and cat's grace) or any number of other things. Fireing into melee with a bow just means -4 to hit, I have played wizards where this was not too bad, thanks to high dex (again with the buffs) the attack bonus still was within reason. I encurage clerics not to heal with everything they have, but only as needed to survive, and usually outside of combat. and I encurage wizards to be more willing to put their high AC on the line in close combat. Atleast at low levels, at higher ones nothing should survive to get into close combat with you.
look at the board (assuming you play with miniatures) and the shape of your spell, then figure out where it needs to be centered to not hit your party... then figure out where you need to be to center it there. shouldnt be too hard, the current mage I am playing has only hit a party member with a spell once, and that was hitting myself with a fireball, I made the save, the monsters didn't... the same theory applied to Sleep when I was lower level (keep in mind that elfs dont count in the area of sleep, they are immune) or color spray (had I used it).
I like elfs for wizards for the fact that they move faster than gnomes, and they get proficency with longsword and bows.
I play wizards and I am not afraid to mix it up in melee with them, I also have never had one die on me lower than 10th level.
and a parting piece of advice, just because you can't hit doesn't mean you can't flank...