So far in game I have managed to hit teammates 3 times and have been hit maybe a couple of times too, most occasionally I see it happen with burst fires, but something i've noticed is that if you run unpredictably it is understandable that you get hit accidentally, if you use predictable patterns when you run, people are much less likely to hit you on accident.
When it comes to the non accident situations, you gotta learn some common sense. What i've noticed is that people, like yourself, who "tag" along with an already established group or squad, just go nuts when they see a body hit the floor, these people rush each and every corpse that appears even in the middle of combat.. It's like they think noone can see them taking the whole groups loot right in front of them. If you apply this to the bodies of their teammates too, then it becomes COMPLETELY understandable as to why you got shot, learn some manners. Not every corpse that hits the ground is "fair game" for a loot race.
I WAS all for the idea of loot it all and sort it out when you get home, but only people you can trust seem to play this way, others think you are insulting their religion when they take 90% of a mission or encounters loot and run to bank it under your nose.