There are several ways out of the dilemma:
Mass vs. conventional guns. Yes, as long as the guns don't fire constantly in the same direction, the huge inertia of the ship will keep the ship on course to a good degree because of Newton: $\vec{F_{Ship}}=m_{ship} \times \vec{a_{Ship}}$, wherein $\vec{F_{Ship}}=-\vec{F_{Charge}}$, so the larger the bigger the charge the higher the force upon the ship (Newton's 3rd Law!), but the acceleration it gives is antiproportional to the mass involved, so in order to do some meaningful changes that affect the ship in the battle, the guns either have to be increadibly strong, or fired at increadible speed and repeatedly.
But there is more!
Missiles. Launching missiles is like dropping bombs: open the hatch, undock the weapon and it goes on it's way. The exhaust from the missiles will apply some force to the ship, but again, that is tiny in comparison to its inertia and will only result in very very tiny acceleration bits - which are neglectable. In fact, these could be used to counter the tiny ammounts of the guns to some degree.
Lasers. Just using (microwave or X-ray) Lasers is using one of the most easily overlooked, recoilless weapon. Aiming a microwave laser at the cooling system of a larger ship would most likely cause it to overheat and might even cause it to rupture!
Away Teams/Boarding/Fighters. If there is a way to send away/borading teams to other ships, that is for sure a recoil less way to fight other ships, even if the price in blood might be huge. Launching a boarding ship would not meaningfully impact a space hulk of battleship size. Likewise, launching fighter crafts would not impact either.