If you want to stay with the company, and they're willing to help you work remotely, then the sooner you begin the conversation about how it's going to work remotely the better.
If you don't want to, or it's not likely/practical for you to work remotely, then it's departure for you, and the road ahead is clear.
- If they're going to "treat you different" then they'll do it no matter how much notice you give. People are people, so still be a professional.
- Think not about how they'll treat you, but about maintaining a good reference.
- Leaving a job can sometimes feel like breaking up a relationship. Similar rules apply. Be clear, honest, polite, but unambiguous about where you're headed (out the door), and just take it as it comes. If you're leaving then you're leaving, and nothing is going to change that. Don't fear it, just face it.
- If 2 weeks is customary for your industry and locale, then there's no requirement for you to give more notice than that, so don't feel bad if you only give 2 weeks notice. On the other hand, if you want to give more notice, they'd probably appreciate it, and that's okay too.
Fears that have been expressed in similar questions phrase these concerns like, "This is a small company, and it's going to hurt the company, so should I bend over backwards for them and do a bunch of extra work because I feel guilty?" or "Will I be treated differently? I don't want to be treated differently," or "I'm in the middle of a 6 month project, so should I stick around longer or give much greater notice?"
These questions are mostly irrelevant, honestly.
In fact, the specific reason you're leaving is mostly irrelevant as well. What if you had cancer? Would you worry about how much notice you gave then? The advice remains the same regardless.
You're leaving. Just be a professional, let the company do what they need to do to prepare for your departure, and secure a good reference. The rest is details.
Some places will treat you differently. You are different, after all - you're an employee who is definitely on their way out, as opposed to an employee they expect to retain for the foreseeable future - this is a real difference. I would be more concerned about fairness than difference (we treat more experienced employees differently than entry-level ones...this is generally fair, yes?) But it's also possible, depending on your role and such, that they'll take work away from you because they don't want to start something with you that won't get finished.
Either way, look, you're officially different from other employees at this point, because your situation is, literally, different. So long as they're not breaking laws then it's going to be hard to show any real harm here. If you get piled on or relieved of most responsibilities, either way it's going to happen, so just let it happen, get a good reference, and go boldly into your future. It is all a temporary situation anyway and probably not worth fretting about very much.