My choice of medieval anti-mech tactic would be to sit in my castle and taunt it.
And really, that's probably what would happen. Field battles were only fought if both sides thought they could win, or if one side was somehow unable to retreat. Ambushes with a giant stompy robot are kind of unlikely and keeping enemy intelligence unaware of it is too, so you would inevitably end up with an enemy that runs back to either a fortified position, or someplace your stompy robot can't go like marshlands, dense forests or any place with lots of elevation or rocks about. Or across a river, good luck rafting across a giant mech with medieval tech.
The mech could be of some use against some types of fortifications, the same sorts would be would vulnerable to siege towers I suppose. But the better, nastier fortifications have moats, hills or cliffs in front of their walls which would really complicate matters. You would also put irreplaceable assets at risk that an regular siege tower could do.
Walls could also be used to house things that could at the very least knock or pull over a mech, for instance: Some ballistas fitted with bolts that have a grappling hook on one end and a rope with a big rock on the other end. Shoot the hooks at the mech, pull them back until one catches, tie the rope to the rock and shove the rock off the wall. Alternately, the defenders could just throw a whole bunch of flammable stuff on it and set it on fire. Tanks fare badly against prolonged fires, and mechs likely would too since they would be unable to exhaust heat and slowly cook the electronics inside.
If the commander didn't want to risk them that way, they could use their mechs to tow around wooden walls and walkways for cover, or carts of soldiers. Maybe they could even be used to operate artillery. Though those are all things humans and horses can do as well...
In conclusion, I think mechs (the melee-restricted ones at least) would probably skew medieval/early renaissance warfare even more towards siege warfare, but would only have a limited role in the actual sieging. It would also have trouble moving across rough terrain and water, which limits strategic utility. They would be a useful asset, but not an all dominating one and possibly mostly useful in defensive combat.
Edit: Heheh, I imagine if the mech's AI is all angsty and full of hate, but unable to suppress manual overrides by the pilot, that it would slowly go insane while its owners dress it up in medieval heraldry and parade it around towns, or when they have it do menial stuff like lifting stone blocks for construction.