Mascarpone would likely be too fatty. Fromage frais has only 0 to 8% fat content. A low fat cream cheese would be closer to fromage frais in fat content, taste and texture, although I'm not exactly sure how it would hold up to the heat.
I would suggest ricotta, also a fresh cheese (=english for fromage frais), proven potential in hot preparations. Only problem is that it gets grainy and dry to my taste. I often mix it with an egg or an eggyolk, but it stays to dry for my taste. Seems it helps to bring ricotta to room temperature first before using it in a recipe?
Why not post the entire recipe, that would make things more easy to suggest other options.
I personally wouldn't use any fresh cheese in a gratin and start with a roux plus milk and/or a little fishstock(or better yet, chickenstock!) plus a small dash of cream. Just to be sure it keeps a nice smooth appearance and taste after being in the oven.