I would not say that this specifically is genetic - I've noticed that some families share this kind of trait but I'm unsure whether to class it as nature over nurture.
Anyway, it certainly is possible to train yourself out of it to a degree, without losing the ability to focus when you need to. Bear in mind that this is not a fault, and your personal training has not been a waste of time - it's an incredibly useful skill to have and you should not be ashamed of it.
I support what Bookeater suggests and would like to add to this. While the easiest way forward is to introduce a specific trigger or switch to grab your attention, I would say that you can make this better by meeting your wife halfway. Here's a few tips I stand by:
Make a mental note to 'check in' as frequently as you can: while you're busy, try to keep reminding yourself that your wife may require your attention, and check on her periodically. If this is too hard to do initially, you can set an alarm or something.
While this may seem clunky and ineffective, there are two reasons why it's so useful.
- You are training yourself to keep her in your mind and constantly keep some of your attention devoted to her.
- It stops you from getting too absorbed in what you're doing if it is constantly broken up with small interactions. Obviously not a good thing when you're trying to maximise productivity, but useful in a home environment where you need to spread your attention.
This works to the same end as the second reason for the above. Try and set yourself a small task to complete periodically to draw your attention away from what you're doing, keeping you from getting too absorbed. It might be irritating at first, but in addition to keeping you from getting lost in what you're doing it will teach you to multitask over time. After continuing the routine for some time, you will discover that you are able to effectively split your attention between the two tasks. Now, this doesn't mean that you're not paying attention to the smaller task, the case should be that you are multitasking. You should find over time that, while performing the main task, you are subconsciously waiting for the next distraction, and it should apply to more than just the specific task you've assigned.
The task that you decide to do is up to you, but it can't be too simple that you can do it without thinking (at least not initially.) A personal favourite was to write out some song lyrics or do a little algebra equation, usually switching between the two. Those should be tricky enough that you have to think about them but not so difficult as to actually take up a lot of your time.
Separate home and work
If possible, try to mentally abstract your home life away from your work life. Establish in your mind that work is a place to be devoted to a single task and completely focused, and home is a place to be relaxed and aware of more than one thing going on. This is particularly hard if you work from home, but otherwise useful!
Some ways to do this could be to try and mentally connect specific objects around the house to a relaxed attitude. It sounds a bit hokey, but if you glance up at the clock and recall, "Ah yes, I need to divide my attention," and use that as a cue to think about what is going on around you, you will end up doing it subconsciously.
Communicate and take your time
As Bookeater says, you may very well want to discuss this with your wife. I would suggest that you let her know your plans and how you hope to achieve your goal, and constantly get feedback from her about how you are doing. She will be the one mainly noticing the change, so her opinion is absolutely vital. Ask her what she thinks is working and for any of her own suggestions.
All these practices may take a while for any change to be noticeable, so keep at it! In the same way that you spent time training yourself to be focused, you will need to spend time moving in the other direction. If you stick to it, though, it will be worth it, I'm sure.