You can get some of the numbers you need from JPL Horizons but you will need to have something go over the results to get the minimum and maximum values over the time span you are interested in.
If you go to to JPL Horizons it will look something like this (you may get different defaults if you've been there before):

You need to change the 'Ephemeris Type' to 'Vector Table' and then select the 'Target Body' by hitting Edit. You can then type in a target; putting in Mars
will result in a list of options asking you to clarify which "Mars" you meant:
I'm assuming you want you want Mars (the planet) itself, rather than one of the spacecraft or the barycenter (slightly displaced from Mars's center due to Phobos and Deimos) so you should select 'MB: Mars'
Next you need to select the coordinate center where you want the vectors and distances from - in your example this will be the geocenter which is code 500
in Horizons (@earth
works as well but will popup a list asking whether you want the geocenter or the Earth-Moon Barycenter):

You can then select the start and end times and the step size for the results that you want to cover. The default output is setup to provide a (somewhat) human readable HTML table with the full state vector ($x, y, z$ and velocities in $\dot{x}, \dot{y}, \dot{z}$), the light travel time, the range and the range rate. Since you are just interested in the range, I suggest you go into 'Table Settings' and select option 6.
under output quantities to get the light time, range and range rate and set it to 'au and days'. For ease of later analysis, I would suggest you tick the CSV output
as well so it looks like this:

(you can also have output in km and seconds rather than au and days if you want). Hitting 'Generate ephemeris' will then produce the output table. There will be a header at the top with details about the target body and the settings you have chosen and the main table will start (with $$SOE
) after a table header:

This will have the Julian and calendar datetimes in Barycentric Dynamical Time (TDB) and then the light travel time (LT
; in days in this case), the range/distance (RG
; in au here) between Earth and Mars (geocenter to center of Mars or whatever you actually set the target and coordinate center to) and the range rate/change in distance (RR
; in au/day) - the quantities in the output are explained in more detail below the table.
As for getting the minimum and maximum separation, as far as I know there is no way to do this in Horizons directly. You would need to download the results table (in CSV format) and load it into a spreadsheet to calculate a MIN()
and MAX()
on the RG
column or use something like Python+AstroPy to read the table in and do the min/max on it.
If you do want to use Python, then you could use astroquery to query JPL Horizons directly and get an Astropy Table
back which can be manipulated as you like.