Confession is the FIRST step when you work towards an indulgence. Thus, any mortal sins are absolved at the onset. If you commit a mortal sin *after *the initial confession, but *before *the requirements of the indulgence have been completed, you cannot receive the Grace of the indulgence (because in a state of mortal sin, you cannot receive ANY Sanctifying Grace).
If you are working towards an indulgence, and commit a mortal sin (after your initial Confession), and then go to Confession (again), I am not sure if you can just “pick up where you left off” or if you should begin the process afresh. Maybe Bro.Rich or someone else who is smarter than I can provide some insight here.