If someone is in a state of mortal sin but they make an act of perfect contrition and intend to go to confession as soon as possible, what do they do in the meantime? Should this person be continually worrying or thinking about the mortal sin they have committed in the sense that they may die before getting to confession?
This person should go to confession at the next prior opportunity (whenever that may be just as long as they're not intentionally putting it off), but in the meantime they are not required to do anything but avoiding sin as we all should be doing anyway.
I believe most parish priests can hear confessions by appointment so if getting to a weekend confession is difficult, a parish priest is bound by canon law to cater for the needs of the penitent:
Can. 986 §1 All to whom by virtue of office the care of souls is committed, are bound to provide for the hearing of the confessions of the faithful entrusted to them, who reasonably request confession, and they are to provide these faithful with an opportunity to make individual confession on days and at times arranged to suit them.
Furthermore, if a person dies with perfect contrition (being genuinely sorry for their sins and having a heartfelt desire to repent) before they are physically able to make it to confession, as long as that person dies always having the intention of confessing their sins to a priest, then they die a friend of God and would not suffer the consequences of Mortal Sin and could be saved. For example, a person in the state of Mortal Sin may get in in their car to drive to their local parish to have their confession heard but are tragically killed in an automobile accident. Even though this person was not physically able to confess their sins by the Sacrament of Reconciliation, it was their intention to have their sins absolved and God would be merciful because of their perfect contrition.
I doubt God would say, "Oh you were on your way to confession but died before you could get there. Sorry, not good enough and I don't care if you were truly sorry for your sins!"
Further reading: http://www.newadvent.org/cathen/04337a.htm
"Perfect contrition will obtain pardon for mortal sin without the Sacrament of Penance when we cannot go to confession, but with the perfect contrition we must have the intention of going to confession as soon as possible, if we again have the opportunity." - Baltimore Catechism, http://www.ourladyswarriors.org/faith/bc3-18.htm