The tonic's seventh is both the seventh of the chord and the leading tone of the scale. So what should happen with this seventh if it needs to be raised or lowered?
If you're talking about a diatonic I chord in a major key with a seventh, then I think you're talking about the apparent conflict between the need for a leading tone to resolve up and for a harmonic seventh to resolve down. The answer, at least for common practice tonality, is that the note's role as harmonic seventh supersedes its status as leading tone—it should resolve down to the sixth scale degree in the next harmony. Most often the harmonic change will be to ii or IV.
In general, the tonic seventh is built in the scale it is used in. So the major scale tonic chord 7th is usually is a Major 7th and the minor natural scale tonic 7th chord is usually a minor 7th. Both of these chords are more for ornamentation than for resolution so the normal theory applies to the tonic and it's seventh where the tonic can pretty much go anywhere. There are special cases for each of these though.
In major it is common to see the tonic chord have a lowered 7th and become the a dominant 7th. In this case the tonic chord is acting more like a dominant and resolves to the subdominant as the dominant would resolve to the tonic. So in analysis the progression would be looked at as
IV. In this case you are borrowing from the key of the subdominat so for the
V7/IV the scale to harmonize with it would be that of the subdominant and would return to the scale of the tonic once the
IV was played.
In the harmonic and melodic minor scale, the 7th is usually raised to signify a return to tonic. This sometimes will apply to the construction of a 7th chord of the tonic chord. While this may be, is not used in classic counterpoint because it creates an augmented interval from the 3rd to the 7th.
So the only real difference is if the tonic is dominant seventh then it is best to resolve to the subdomintant. Besides that treat it like a tonic like normal.
A lowered seventh is common. A raised seventh is so completely indistinguishable from an octave as to be pointless!
The lowered seventh may flavour the tonic chord as a dominant 7th related to IV. It may just be a flavour, as in the blues I7 IV7 V7 progression. (But if you want to feel some "dominant 7th of F" in the C7, that's fine.)
The natural seventh may feel like a leading note. But, in a tonic chord, where's it got to lead TO? You're home already! If you're thinking in a "chord=scale" way, it's just one of the notes available for melodic improvisation without breaking that silly self-imposed rule about departing from the "permitted" scale. Don't get too locked into that system, it's very limited.