Can I connect the ground pin of the wall socket to neutral?
UPDATE - OCTOBER 26th 2019.

The OP has now connected the neutral to ground at the power socket.
This is against all advice from all people commenting.
He is completely ignoring the advice supplied by everyone.
He is wasting their time. 

People who do what this guy has done this will kill themselves and their friends.  

Don't be like this guy.

_____________________________________

Doing what you suggest may be fatal.
Dying will mean you do not have the problem any more but is not the best solution.
Ground and Neutral are NOT identical in functionality and need to be isolated from each other in use (despite being connected at the switchboard). 


  There are some appliances in the apartment that don't have a problem with a wall socket that doesn't have a ground; ... But there are other appliances that have a problem and need grounding to get rid of these leaking currents 


If, as you appear to be saying, the problem occurs with only some appliances only when a power outlet without ground is used then the correct solution is to use outlets which DO have a correct ground connection. 

The reason that the problem exists is probably due to noise reduction capacitors in the input circuitry to the appliances concerned. There are two "Y" capacitors connected between ground and Phase &amp; Neutral. When the ground lead is correctly connected the two capacitors 'carry noise currents to ground'. But, when the ground connection is floating the two capacitors form a voltage divider between phase and neutral, with the appliance chassis ground at the midpoint between the two capacitors - forming a high impedance connection at about half supply voltage. This then causes electric shocks between the appliance body at about Vmains/2 and a user connecting between boy and ground (via shoes or hands or ...) will feel a shock. This is usually unpleasant but nowhere near as severe as a full mains to ground shock. If the shock you feel is more a highly unpleasant bite than a muscle spasming grabbing blow then you are probably experiencing a Y capacitor shock.
Use a grounded outlet!