Parshat Ki Savo
While the Torah is writing about how the people were commanded to write the Trah on stones by the Jordan River and build an altar, etc. it adds in 27:7 וזבחת שלמים ואכלת שם ושמחת לפני ... - you should slaught sacrifices and eat there and rejoice before Hashem.. and then it gets right back to saying that they should write the Torah on the stones.
What does this happiness have to do with what's going - writing down the commandments, etc.? Why is this mentioned right here in the middle of this discussion?
I think this shows how integral joy and happiness is in the serving of Hashem and fulfilling the Torah. As it is telling us to write and keep the Torah it is telling us we have to be joyous.
This thought is enhanced by what is written in the "tochacha" in 28:47 where it tells us the various punishments that will befall the nation in the even that they do not keep the Torah. It says there, "Because you did not serve Hashem with simcha" - Even if you did serve Hashem, but if you do not do it with the joy and happiness, that means it is lacking in its dedication and truth.
A vital component of service is the joy.