Depends why (i.e. what heart condition) the pacemaker is being fitted. In some cases, it is there to stop the heart beating too slowly when you are static/sedentary , often because of missed heart beats (e.g. second degree type 1 heart block). In this case, depending on how it is programmed, it will only cut in if your heart rate falls below a predetermined level e.g. 40 or 50 bpm and in this case, it should have no impact on your cycling performance. In other cases e.g. rate responsive, it is there because your heart can't deliver the bpm required when it is under an increased workload and that may have an impact but that will depend on you specific condition and the associated programming.
I've found the op no big deal (and I've had it twice, once to get fitted and then to get the unit replaced because the battery was low). It was done under local rather than general and you can drive fairly soon (days rather than months) after the op, after having got medical clearance. You must tell the DVLA and they will probably place some restrictions on what you can drive e.g. not allowed to drive mini buses etc.