The core sugya in Moed Katan 19a:9 records the dispute over Rosh Hashana and Yom Kippur, concluding that the Rabbis treat these days like Shabbat rather than like the pilgrimage festivals, yet in either view they interrupt the mourning period even though they are not counted toward its days.
The broader principle that a Festival overrides individual mourning because the public mitzvah of rejoicing displaces the private mitzvah of mourning is stated in Moed Katan 14b:8, and Moed Katan 24b-25a shows how the day before a Festival together with the Festival itself can count as multiple days toward the shiva and shloshim reckoning.
Shulchan Arukh, Orach Chayim 548:11 codifies that Rosh Hashana and Yom Kippur are treated like festivals for nullifying mourning, so that if mourning began even one hour before Yom Kippur, the shiva is cancelled and the onset of Sukkot cancels the shloshim, and Arukh HaShulchan, Orach Chaim 548:10 and Mishnah Berurah 548:14 elaborate on this same mechanism of nullification.
Tur, Yoreh De'ah 399 and Arukh HaShulchan, Yoreh De'ah 399:7 detail the conditions under which a festival (and by extension Yom Kippur) interrupts and nullifies the days of mourning, while Beit Yosef, Yoreh De'ah 399:17 traces the halakhic resolution of the tannaitic dispute to the ruling that Rosh Hashana and Yom Kippur function like the festivals for this purpose.
Sefer HaChinukh 264:1 frames the underlying principle that only the first day of mourning is biblically mandated, so that the public mitzvah of the day overrides the private mitzvah of mourning, and the contemporary formulation in Rav Eliezer Melamed (Peninei Halakhah, Family 10:10) confirms that Yom Kippur is among the festivals that nullify the shiva if it had already begun even one hour earlier.
Tzitz Eliezer (Tzitz Eliezer 17:28) addresses the special obligation of teshuvah on Yom Kippur, explaining that the day is a time of unique closeness to Hashem and divine purification that enables atonement, though sins between people still require appeasing the injured party.