The NVA did not continue to use the M35/M40/M42 'Stalhelm', as it was a potent symbol of the German Army during WW2. The NVA first used the M54, which looks like a cross between a German and Russian helmet, but ultimately they settled on the M56, which the Germans had in the prototype stage as the M45 at the end of the war. The M56 (in 1945 called the M45) was rejected by Hitler, because it looked nothing like the traditional WW2 German helmet that dates back to WW1. The Germans only issued about 100 units of the M45/M56 during the final battle of Berlin in 1945, but they were never official issue.
In the picture we probably are seeing recycled WW2 helmets (unless they came from Spain under Franco or South America). In the 1960's the Germans were helping the Afghans with development and training a national police force, so there was some connection and there still was plenty of surplus laying around from the war that was picked up by developing nations.