Connecting DC 0V to mains earth
Both possibilities you mention can be valid choices, depending on the situation.  However, don't connect the AC line ground and the local ground as your diagram shows.  In equipment that is enclosed in a metal chassis, the AC line ground wire is usually connected to the chassis.  Line and neutral are always considered "hot", even though, in theory, neutral isn't supposed to have any voltage on it.

One issue is creating a ground loop.  For movable equipment, you just connect the chassis to the AC line ground.  However, for fixed mounted equipment, you may have the option of connecting to a local ground.

Connecting the local ground and AC line ground is not a good idea as this can cause a ground loop.  In such a case, it is usually better to connect the outer chassis to the local ground.  The frame of a power supply might still be connected to the AC line ground, but then that shouldn't be shorted to the chassis.  Or, you ignore the AC line ground completely and tie the power supply frame and whole chassis to the local ground.

Some power supplies are themselves insulated and only have two AC input connections.  Those completely get around this problem because there is no place to connect the ground to.