Ah yes, I'm familiar with that optimistic feeling when things seem to be going to plan, only to have it fall to pieces around me!
I finally beat the Mothership last night, playing with the Zoltan Cruiser. A couple of Ion Cannons to take down shields while the Glaive Beam ripped through their systems and hull worked very well, and I managed to pick up a Drone System and Defence Drone 1 as well as Stealth before reaching the boss.
The real kicker turned out to be slotting in a Fire Bomb though, which I didn't use much on the smaller stuff but which proved extremely useful on the Mothership as the weapons are in separate rooms to the rest of the ship, and a Fire Bomb ignores shields and quickly and easily takes out the weapons and their crew members.
Along the way I unlocked the Zoltan Ship B layout, the ship for finishing the game and the Stealth Ship, so now I have some new toys to play with!
Give a man a fish and he will eat for a day; teach a man to fish and he will eat for a lifetime; give a man religion and he will die praying for a fish