Does a Jew fast only if he/she participates in prayer service?
Your question is not fully clear. If you are referring to the Jewish fast days such as Yom Kippur, the obligation to fast is not connected to the prayers of the day. Even one who is on their own and even not praying at all, as the commandment to fast, and fulfills a great mitzvah by doing so. In fact one who can either pray or fast, should certainly fast as this is a Biblical commandment as opposed to the prayer service which is primarily Rabbinic.