even in apartments there should be a earthing option as all high rise buildings have one.have you ever called an electrician to take a look at your apartment's main power board?anyway protective earthing is simply providing a connection to earth to provide a safe path to excess electricity to safely pass through.Attach one end of a wire to the side wall(metallic) of your computer & attach the other end to a nail or something metallic and nail it in the wall.
That wont work $#!+. Earthing has to provide a direct sink for excess charge.
ie, @OP
a. Take a copper wire and connect it to the earthing socket of the wall socket and pull it directly to the ground and then have a piece of conductive metal(ie, an iron rod like they use in construction, or a GI pipe) inserted about 1.5m into the earth connected to that end of the wire. Actually even lesser will do, but that is the standard.
Alternatively find the pipe that pulls water from the ground to the over head tank. Check if it is continuously metal till your house, as since many years some builders have used plastic ones too. Find the nearest point of that pipe in your house and use that as the contact point to the earth.
Simply find the earthing wire in the house mains and check if it is continuous to the ground.
Or
b. If the house is earthed properly the other wall sockets will test good letting you know if the socket to your computer is one of the few that were not earthed.
Or
c. Leave it to the electrician

And about the shut down due to your hand impacting the cable, of course that slightly pulled the wire from the sockets on the wall and the PSU and cut off the connection. Totally harmless.