Try to avoid this if at all possible.
However, when eventually you are forced go, put it off another couple of days.
If you have to go the office in Yokohama, don't try to find a map on the internet...because there isn't one. Actually there is, but it will lead you to a doll museum next to Yamashita park. The only way to find the real immigration office at Yokohama is the ask the station staff, and he will direct you to a large concrete block variously signposted as
'Dr Hepburn's former residence', 'Yokohama municipal prefectural office', or 'Private-Keep Out'
Finally you will notice the inexpressibly minute English letter writing on the postbox, and only when you enter the building will you notice the streams of desperate foreigners crowding the elevators. The first four floors are occupied entirely by stacks of immigration forms, piled to the ceiling, so the dirty gaijin crowd into the tiny lifts. Disliking the smell of people in general, let alone desperate people, I took the stairs. Inside, it was like the refugee scenes from Children of Men. No, I'm exaggerating. A bit. But happy camping it is not. Take a degrading, dehumanising number and wait your turn with an officious pointy-faced moron who will expetct you to read and write kanji and will look at you like a piece of used toilet paper when she discovers you lack a simple form nobody told you that you had to get from another officious cow in another grey concrete troll house in another part of this rotten souless city.
Just as well we would never treat foreigners like that back home, huh?????
Yokohama Immigration Office: Helpfully signposted