Hello lybrate-user, spitting blood occasionally associated with bad smell, is very commonly due to infection
of tissues surrounding your teeth. At times it can also present as sensitivity if there is recession of the gums. However you need not worry it can be easily cured by professional cleaning of your teeth and possibly a short course of antibiotics. Please visit your dentist
who will do the needful. All the best.