C.,
Don't be too hard on yourself. First of all you have "pregnancy brain", actually "END of pregnancy brain". It's totally normal. I found myself drifting very often during my pregnancy.
I just had my second baby 9 weeks ago and have a 2 y/o already. At first, you are 100% wrapped up in the new baby and that's normal. Don't feel guilty. In our house, my DH stepped up and really spent a lot of time with Jacob (our older one). Before Ryan (baby) came, Jacob was all "Mama, mama mama." After the couple of weeks my DH spent with him, everything turned to "Daddy, daddy daddy."
It's not that I didn't spend time with Jacob, but it was limited because I was caring for and breast feeding Ryan. I would encourage Jacob to come sit by me when I was feeding or holding Ryan but his attention span is, well zero - lol. As soon as Ryan was sleeping, I would shift my attention to Jacob and made sure to spend time with him. When I could, I would grab Jacob and take a run to the store and leave the baby with Dad. It was a special trip for him and Mom to take.
Anyway, don't feel guilty about your mind drifting to a work issue. Mine does, my husbands does - everyone's does.
Good luck with the delivery and congrats!
T.