Not words of comfort
In Pirkei Avot 4:181, R' Shim'on ben Elazar says:
וְאַל תְּנַחֲמֶנּוּ בְּשָׁעָה שֶׁמֵּתוֹ מֻטָּל לְפָנָיו
[D]o not console him at the time when his deceased lies before him;
The Rambam, in Hilchot De'ot 5:7, includes this rule in his advice for Torah scholars as a special case of
אִם רוֹאֶה שֶׁדְּבָרָיו מוֹעִילִים וְנִשְׁמָעִים אוֹמֵר וְאִם לָאו שׁוֹתֵק
If he sees that his words are constructive and will be heard, he should speak; and if not, he should remain silent.
מִפְּנֵי שֶׁהוּא בָּהוּל עַד שֶׁיִּקְבְּרֵהוּ.
... because he is agitated until he has buried [the deceased].
R' Aaron Levine, in To Comfort the Bereaved: A Guide for Mourners and Those Who Visit Them (p. 35), cites this passage in Avot to the same effect and says that the mitzva of comforting mourners does not apply before the funeral.
This would all seem to indicate that the mourner's onen period is not the time to offer consolation, including through the "Hamakom" formula.
As described in the chapter by R' Lamm that you linked, the onen's focus is supposed to be on taking care of the practical arrangements for the burial. Therefore, it would seem that the most appropriate thing to say to him/her is something along the lines of2:
Please let me know if there's any way I can help.
R' Levine cites a responsum by R' Nissim Avraham Ashkenazi (Ma'asei Avraham #60) that approves of offering to help.
Some particular matters that you might be able to offer help with include:
Finding contact information for the relevant burial society, funeral home, and cemetery.
Finding a rabbi who will be available to officiate at the funeral and burial.
Spreading the word about the times and places of the funeral, burial, and shiv'a.
Ensuring that there will be a minyan at the funeral and burial.
Preparing the houses in which people will be sitting shiva for visitors.
Taking care of domestic responsibilities, including meals, childcare, housekeeping, etc. that the onen may need to set aside now to focus on the burial and may need to set aside during shiva.
R' Levine provides a longer list of arrangements that friends could help make to assist the mourner, all consistent with the general categories listed here.
... With caution
R' Levine offers the following note of caution:
Generally, the rabbi, the Chevra Kaddisha, and the funeral home--all experienced in these matters--can be the most helpful and supportive in most of these areas. But discretion on the part of others is strongly advised.
He points out that this time of confusion and busy-ness is not a good time for many well-meaning people to converge on the mourners. As an alternative, he suggests that well-wishers get in touch with non-mourner members of the family to offer help.
1. Hat-tip to DoubleAA for citing this source in a comment on the question.
2. Copied verbatim from a comment on the question by Shalom.