Putting one above a heat source will likely shorten it's life span, by how much depends on the heat and frequency both fire and TV will be in use at the same time, along quality of the TV itself. All those little slots on the back of the TV are for heat dissipation to prevent damage to the internal components, put the TV in a warm place and the TV will run hotter, shortening the life expectancy of some of the internal electronics and the plastics used. As above, a shelf underneath will protect against the worst along with the added benefit of redirecting some of the rising heat convection current out into the room.
You mention building the TV into the wall, recessing it will help, but ensure there is adequate ventilation around it. Look at your TV manual, it will likely indicate minimum gaps recommended above, below, to the sides and behind your screen, mine foe example states a minimum of 10cm above and to the sides, and 7cm behind and below.