All you need to do is fill the farmer's inventory with seeds before you put him in the wheat field. That way he won't be able to pick up any wheat and you can collect it however you want (I use a hopper minecart).
Villagers have 8 inventory slots, so toss 8 stacks of seeds to a farmer with an empty inventory then turn him loose in a wheat field. He will harvest the mature wheat plants, but because all of his inventory slots have seeds in them, he will only be able to pick up more seeds. The wheat will just sit there until you collect it.
This guy has been harvesting wheat for me for years, and my wheat farm is still going strong.
So how do you get a farmer with an empty inventory? Cure a villager zombie would be the most sure way. You could also try getting a baby before he harvests anything or another villager tosses him food. Or you could pull one from a carrot or potato farm, put him in an empty tilled field and follow him around picking up everything he plants until he stops planting, then toss him 8 stacks of seeds and make sure he picks them all up.
Another option is to zombify a farmer then cure him. Place a farmer class villager in with a zombie, if you play on hard there is a 100% conversion rate. Wait for the zombie to attack the villager and turn him into a villager zombie, then kill off the other zombie, hit the villager zombie with a splash potion of weakness and feed him a golden apple. Wait a few minutes and you'll have an nice empty farmer to toss your seeds to.