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?
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
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.
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.