Does Hashem benefit from mankind doing the commandments of the Torah?
The Ramban states in Devorim (Perek Kof Beis, Pasuk Vov) that "there is no benefit in our keeping of mitzvos to the Holy One blessed be He." One cannot "benefit Him" or "harm Him" through the keeping or not keeping of mitzvos. He states further that our "words of praise and remembrances of his miracles are considered as nothingness and emptiness to him. All these [mitzvos] are for our benefit alone. This is something agreed upon by all our Rabbis."
Rambam states in the Moreh Nevuchim, Book I, Chapter 55 that no change or emotion can ever be predicated of Hashem. As the Novie states in Malachi Perek Gimmel, Pasuk Vov, "I, G-d, do not change." Rambam states in the Yad, Laws Concerning the Fundamentals of our Faith, Perek Alef, Halacha Yud Alef, "and He does not change, for there is nothing that can cause change in him. There does not exist in him... anger or laughter, happiness or sadness…" It is certainly clear from the Rambam and Ramban that we cannot say of the Creator that he is at one time sad, and at another happy. He, being perfect, does not change ever. We cannot effect him or change him no matter what we do, whether we are righteous or evil, whether we pray or don't pray.
Based on the above two Rishonim, it would seem that we cannot in any way benefit or change God with the performance of the commandments in the Torah.
The Baal Hatanya explains in Torah Ohr (נה,ד) that
Which he brings from The Midrash Rabbah Shir Hashirim 1:9:
According to chassidus, this is an analogy to understand the benefit so to speak that Hashem gets from our divine service. Although on one hand Hashem does not lack anything, He has made it His ultimate will to have a dwelling place in the lower worlds (Dira B'Tachtonim), and it is His will that this be achieved through the work of a Jew. When a Jew serves Hashem in the proper way he provides this dwelling place for Hashem in the world. So in this way Hashem so to speak benefits from Jews doing mitzvos.
No. G-d gets nothing from a person doing good: "If you sin, how will you affect Him? And if your sins multiplied, what will you have done to Him? If you have been righteous, what can you give Him, or what will He accept from your hand?" (Iyov 35:6-7).
If so, why do we serve G-d?
From Rav Schwab on Prayer (by Rabbi Shim'on Schwab), pp. 416-417:
See also this which basically reinforces the concept: The commandments are not for G-d; they are for us to improve ourselves.