What can be done to fix a hub that has come apart?
That looks fixable to me.

What probably happened is the locknut was loose, and continued riding caused both cone and locknut to unscrew. It's a good job you've stopped riding that bike - riding on that hub now would cause significant damage.

When a hub has a bit of play, the balls are free to move across parts of the cup and cone that aren't designed to support load. Those areas may not have been heat treated and/or polished. That can cause metal wear, resulting in particles grinding between the balls and the 'proper' bearing surfaces. Result: pitted cups and cones.

When a hub has a lot of play (as in your case now), the problem is exacerbated further - the balls may slip out of place completely and bind the hub, causing irreparable damage.

That hub is dirty and the grease is foul. Pull the axle, clean the hub inside and out, and clean the axle, cones, and locknuts. Use a good de-greaser, or failing that, ethyl alcohol, lighter fluid, or equivalent. Wipe it all clean with a lint-free cloth and inspect. If the cups have any scratches you can feel with your little fingernail, I'd ditch the wheel. If the cones have any pitting, I'd get a new pair. Whatever the state of the innards, get a new set of bearing balls.

Sheldon will show you how to re-pack and adjust the hub. It's not difficult, just a bit greasy and fiddly. Wear latex gloves if you like.

It doesn't look like a particularly special hub, so I wouldn't pay a professional to do it; balls and grease are cheap. Do your best and ride it 'til it fails; then just get a new wheel (it's rarely, if ever, worth the cost of lacing a new hub to an old rim).