One half millimeter seems really small, and well within many of the requirements for flatness from the flooring suppliers. I do not do conversion on the fly very well, but most flooring makers want a floor flat enough so that if you use a good straight edge, any where from 8 to 10 feet long and if you balance the straight edge over a presumed high spot, the straight edge will show no more of a gap that is 1/16" to 1/8", on either end. depending on what you find in the install guide. Flatter is always better, but if your residue is only that thick and setting a straight edge over it, and you see no more that what the install guide calls for, then have at it. It is important to get it flat enough to be with in the guideline for install.
Small "pock marks" left by nails are of no concern as long as they are no larger than a diameter of an inch or two and only at the perimeters of the walls where nobody can tread over them. If they are in the middle of the floor where traffic is, the typical laminate (MDF core) will span over small spots like that, but if it is a thin vinyl laminate, foot traffic will push it into the depression.