The original Matan Torah — meaning, when we celebrate Shavuos — is the time when we mistakenly thereafter served the Golden Calf. Why would we celebrate that day? It is equivalent to celebrating after marrying one's spouse on a different day — the day the couple broke their first engagement.
The Golden Calf was made on the 16th of Tammuz, forty (actually, 39) days after the Giving of the Torah. But that was not yet in evidence on Shavuos, or for the next 38 days afterwards. During that time, rather, we were able to rejoice with the Torah we had received and with the tremendous spiritual benefits we obtained along with it. So, "at a time of rejoicing we rejoice, and at a time of mourning we mourn" (Bereishis Rabbah 27:4).
It is true that in a sense, Moshe's shattering the Tablets on the 17th of Tammuz was like the breakup of a marriage (Shemos Rabbah 46:1). But with the reconciliation between us and Hashem on Yom Kippur, we regained much of what we had lost (plus, as a bonus, the entire Oral Torah - ibid.)
And after all, Shavuos commemorates, among other things: