When I was reseraching buying my Marantz, I was also seriously considering the Onkyo 905 which runs very hot . I have the Maratnz 8002 in an Amoire that is closed most of the time; I have the back cut-out so it is open, but the front and sides are closed.
However without air flow, in a closed cabinet Onkyo recommends 6-8" in each direction. This keeps the ajacent air buffer large enough to provide cooling without addtional fan airflow.
Actually the shelf above my AVR is only about 2-3" air gap and about 2" on each side. However, the whole back has been cut-out and is open behind the AVR. Marantz and it stays cool to the touch in an enclosed environment. Normally the front doors shown open, are closed.
My lower powered DVD has closer shelf clearance. about 2".
If you are totally enclosed you might want to follow the Onkyo recommendations closer. But, from the way you are describing you closet you will have open area behind you equipment. If so, then a couple of inches sides and top should work well.