So you would be fine to share at work that your gf cheated on you and left for another dude and so you are a little bit destabilized/unhappy now? (it is just a hypothetical case)
Actually I know a guy who had in a bar fight after a scenario you just described. He's still fine at his job.
It is not like you are going to be fired if you are a software engineer talking a bit about your life. However, "bringing you shit" and discussing it at work is not always welcomed especially in most competitive environments. I guess that people who worked in such environments know what I am talking about.
As an example, have a look at what two other users reply above.