1) Z-buffer (real depth map)
Place a camera above the surface
Set it to Ortographic. Then go in Camera view (Numpad 0) and change its Clipping values in such a way that they are the "tightest" possible to display all the curve (i.e. the biggest possible "Start" and the smallest possible "End")
Render the image (F12), then select "Z-Buffer" in the list of Channels below the render window:
This will give you an actual depth map.
or 2) Z-dependent Emission color (faked depth map using Cycles)
Place your surface in a scene where the world is completely black and there are no lights. Use "Cycles" as the render engine.
Note down the minimum and the maximum "z" location (in my example, 0.1 and 0.9)
Assign a material that has the following node structure:
where in the Math nodes you'll use the values of min(z) and (max(z)-min(z)) noted down before, in my case 0.1 and 0.8.
Of course the colorRamp can be changed according to your needs.
This will color your surface with a different color according to its height:
Place an ortographic camera along the "z" axis (frame the surface from above) and render. The render will be a depth map