This sounds a lot like if one of the old Sith Lords trying to take someone over, and from what I know there's no way to fix it as they're simply far more powerful. Gods are probably worse. Like I said, will sound harsh but I made arrangements for myself if I fall to the darkside, because I will end up terrible too, and there won't be a way to bring me back. Unless you can find a really stong mental cage, but like I said, mortals aren't meant for this and it'll be temporary. Whoever gets this spirit after your friend, if you find a way to fix it, will have to deal with it too.