Add the teams:
/scoreboard teams add Red
/scoreboard teams add Blue
And edit the color to Red and Blue:
/scoreboard teams option Red color red
/scoreboard teams option Blue color blue
Now add objectives for them:
/scoreboard objectives add DeathsRed deathCount
/scoreboard objectives add DeathsBlue deathCount
And setdisplay for them:
/scoreboard objectives setdisplay sidebar.team.blue DeathsBlue
/scoreboard objectives setdisplay sidebar.team.red DeathsRed
Now the team with the color will have the deaths shown.
If you want both teams to see the deaths, you can do it like this instead:
/scoreboard objectives add Deaths deathCount
/scoreboard objectives setdisplay sidebar Deaths
But keep the /scoreboard teams commands.
Reset deaths by doing:
/scoreboard players set @a Deaths 0
The deaths will show up after the player have died once or the command above has been executed.
Hope this helps, even though it's a bit messy.