I never team kill deliberately, and I think that people who deliberately team kill without provocation should be banned from the game for a month.
That said, I've accidentally teamkilled a few embarrassing times in Battlefield: Bad Company. Most recently, I fired a rocket at a distant enemy soldier, only for the rocket to take out a teammates just after he knifed my target. Earlier that day, I threw a grenade that bounced off a tree and killed 2 of my teammates.
I once killed 3 teammates in a single round, which was very sad. My team was using hit and run tactics against the gold crate, and when I saw someone run out of the enemy base, my first reaction was to shoot them. After the third friendly kill in this way, I decided to go cover our flanks instead of doing any more damage.