Here are some tips I gathered over the years playing as medic.
Who to revive first
When you see two or more of your teammates dead on the ground, always check if one of them is medic and revive him/her first. The resurrected medic can immediately revive another teammate. If you can’t tell who is medic by appearance, look for red circle on the body, all classes have their symbol as seen in this image:
If there is no other medic, help the one who is safer place or closer to you.
Use smoke grenades right
First, decide if using the smoke grenade really is necessary. It takes lot of time and you have only one. Also the enemy will know you are preparing to revive and will spam the location with bullets and grenades.
If you go for it, do not throw the smoke grenade at the body you want to revive. Your teammate will probably be disoriented and can run towards his/her second death. Throw it between the body and the enemy to break the line of sight.
Pick a good side-arm
As a medic your primary gun is shotgun, which usually has low range, no precision and low rate of fire. Pick something to cover those disadvantages. People like to use revolvers with scope, that’s basically small sniper rifle. Or something with high rate of fire that can finish off enemies at reasonable distance.
Know your place
You have the most important role in your team. Your job is not to have most kills, but to revive fallen comrades and heal them if necessary. You can’t do that if you take the point and die first. Alway hang a little behind. Also cover the back. Never take the bomb, that is not your job.
Mind the gap
Since you have close-range shotgun, you have big disadvantage in open spaces. Don’t cross them if you don’t have to. If you get shot at, try to close the distance by sliding towards enemy. Aim for the neck. You will hit the head or the torso, both is usually good.
Learn not to revive
Maybe the hardest thing about playing medic is learning when not to revive. Sometimes one of your teammates goes to the other side of the map and dies there. If you leave rest of your team to help her/him, you are letting everyone down. This also holds true if your teammate dies in open space where you can’t revive safely. Wait for cover.
Beware of situations where you are alone, you want to revive but you know enemy is very close. They often just wait to hear the sound of your defibrillator and it will end badly for you. It may be better to attempt to kill them first. Or try to lure them out with fake reviving.
Your teammates may curse at you and be salty if you don’t revive them or if they die right after. Or if you don’t use smoke. Or even if you do use smoke. Those are not their decisions to make. I suggest you learn to ignore it. Or offer them to switch the class so they could carry the responsibility for once.