After you leave the asylum, Joey and Rosa automatically go to the school. Madeline is on the roof, so go up the stairs to find her.
Reasoning with Madeline does little good, though. She wants nothing from the universe except to stop being a spirit guide and just move on, one way or another, and doesn't care if she takes millions with her. We need to find something magical/miraculous here to transport her out of the world and into the void, like any other spirit.
Remember how Madeline's totem worked on the spirits she was hunting? She used her tiara, part of her essence, to transport them to a magical circle. Is that any help?
Maybe we can do the same thing with Madeline -- make a circle in the void, then use some of Joey's essence on it to make a totem that will transport her into it. Okay, I know, that's an extreme long shot. But what else are we going to do?
Go back downstairs and look at Michael's body to find a piece of chalk. Take it.
Now have Joey use his tie on Rosa to transport the two of them to the void. Use the chalk to draw a magical circle on the pavement here. If you now use Joey's tie on the circle, the circle will start to glow, and so will Joey's tie.
Joey can now use that glowing tie on Madeline. Save, then go through the portal one last time.