Hi Barb,
You should check with your local building authority for the local code requirements for the width required for non-flammable materials around the firebox. I would expect it to be at least 12 inches, but I do not know off-hand. There may also be some restriction on the distance the mantel can extend from the wall.
Cement board is non-flammable so you shouldn't have any problem using it around a fireplace. Use any cementitious thinset that is appropriate for the tiles you're putting up - that is, one you have to mix from a powder rather than any premixed stuff in a bucket.
Here's what I found on a website as a MINIMUM from the (U.S.) National Fire Protection Association:
* There must be a least 6 inches between the sides and top of the firebox opening and any wood that projects up to 1.5 inches from the face of the fireplace.
* Any wood that projects more than 1.5 inches from the face of the fireplace, such as a mantel or pilasters, must be at least 12 inches from the opening of the firebox.