Medics are not ment to do damage, but as I know and tons of others, sometimes the person you are healing isn't able to defend you, if it is that he is not skilled enough, or there are too many enemies, or it is a spy that he didn't see. I'm not going to stand down and get killed without a fight
If I play medic, I would manage to get a kdr of 3 or something when playing a medic, spies, pyro's (even pyro's) other medics or demoman can be beaten in melee by the medic, if they are starting players or just not playing their best class.
If you can manage to get 1 strike of the ubersaw or even more, it helps the team out, but be sure if you are doing it you are able to do it, I've seen a lot of medics running towards me to kill me, or running against a minigun....they die and are not really helpful for the team...
Don't attack, untill you need to or it is safe enough to do it, else keep healing people to get your uber up