We study numerically the behavior of a qubit coupled to a quantum dissipative driven oscillator (resonator). Above a critical coupling strength the qubit rotations become synchronized with the oscillator phase. In the synchronized regime, at certain parameters, the qubit exhibits tunneling between two orientations with a macroscopic change of the number of photons in the resonator. The lifetimes in these metastable states can be enormously large. The synchronization leads to a drastic change of qubit radiation spectrum with the appearance of narrow lines corresponding to recently observed single artificial-atom lasing [O. Astafiev, Nature (London) 449, 588 (2007)].