Breaking down how I think I usually approach giving consolation....
I comfort by listening, first and foremost. People mostly want to vent & be heard, and then they will figure out a solution themselves. I do "active" listening, meaning I ask questions & make small comments to indicate I am interested & understanding what they are saying. EDITED TO ADD: INFPs have been called "Harmonizer-Clarifiers" and I realized part of that tag is due to a tendency to help people clarify their own feelings (due to such a familiarity with/focus on feelings & the human condition) so they can identify the actual problem which stirred their emotions; and the harmonizing part is a matter of resolving conflicting feelings (often emotions vs. rational values) or resolving feelings with reality. People often cannot move into the problem-solving action mode until they clear this hurdle (which amounts to "healing"). Anyway, this is something I end up during my "active listening".
If I can empathize, then I do, but without trivializing their experience or making it about me or someone else in a similar/worse situation. I will validate feelings which I truly see as valid.
Usually, this calms them down & they begin to verbally sort out their own feelings towards a solution, in which case I may then begin to offer advice, but I tend to do so indirectly. I may reaffirm their thoughts/feelings which are forming in a constructive direction & simply not support those which aren't via lack of response or a slightly negative one (ie. "do you really think that's a good idea?").
If it seems they need some help, then I use questions to lead their thinking a bit towards a solution or a new perspective, which amounts to advising them, but without assuming they have not thought of these ideas themselves or seeming like I am criticizing them. Again, when they reach constructive conclusions about what to do or how to cope, then I reinforce those.
Lastly, I try and build them up by reminding them what personal strengths they have to deal with the issue, and I offer whatever support I can for any positive solution they may have decided upon.