Just tell God you fucked up, he'll void your contract with Satan and foreclose on His soul that's currently in your body.
Which God would that be? The Christian God - Yahweh or El Elyon (who may be Yahweh's father)?
That's too much detail. Most people who practice selling souls are going to be part of the JCI tradition and pretend that God's history doesn't go further back than the Old Testament.
Or would it be Jesus direct?
Well, he IS the nice one.
Ultimately, whoever you think will accept the 'I fucked up, sorry' prayer.
Or does it count if you go to Allah?
I wasn't aware of a muslim tradition of selling souls to Shaitan?
But if you think Allah can help, ask him.
I would like to be able to say something definite and helpful to the person I know who did this.
To be honest, I think they're suffering psychosomatic effects and the best you can offer is a placebo, so i'd couch it in terms they're predisposed to accept. If they think God can help, fine. Jesus, The Virgin Mary, the Apostle Paul, Saint Cuthbert, Saint Ignatz, the Jumping Jews of Jerusalem, whoever.
I would definitely go with the 'God already owns your soul so the contract is invalid' line of hope from the Bedazzled remake. In the original movie, the plot resolution and Dudley Moore's rescue depended on Satan's arrogance. Not something your friend can count on.
Satan would just lie about the validity of the contract on the assumption that they'd lose all hope of salvation and start acting in a way that'll get them damned, anyway.
Go to church, express repentance, try to live a good life from here on, no more demons, devils or telemarketers.