In a desktop computer PSU, the mains earth GND wire comes in, and it is already externally tied to the neutral wire that will go to part of the full-wave rectifier.
Then after the rectifier, the local primary DC GND, is usually the negative pin of the biggest cap. All the local circuits on the primary side will lead back to there. But then usually, there are high power, flame-resistant, current sense resistors, between this local DC GND on the bottom of the bulk capacitor(s), to the negative terminal of the rectifier. Then some chip will monitor the current returning to the rectifier.
And usually there are some very high voltage, small unpolarized caps, between the mains-earth-GND, and this local DC-GND on the primary side.
But then, on the secondary side, the local DC-GND is connected to the mains-earth-GND. So that just like with audio equipment, the GND on stereo input/output, is also mains-earth GND. And you can hook a stereo into a computer motherboard or soundcard nop problems.
In general any time I'm working on circuits, especially mains powered ones, I'll solder on a few wires, I'm sure that's saved me a bunch of headaches. Now I also have an isolation transformer, so I could touch one hand to the primary side of some DUT, and not have current flow through me and into the floor, and back to some mains-earth GND wire. But touch two wrong places on the primary side, and then I would still get a shock, between the parts of my body touching the primary side. So that's another reason to still solder on test wires.
Any time I work on SMPS, I always have a big GND wire on both the primary and secondary sides. And always remember, only probe one side or the other, and make sure to unhook any probes from opposite side. So far, I haven't damaged myself or my equipment. But that's with an isolation 1:1 transformer.