What I have done...
Grant in Iowa
You will be surprised just how hard these magnets grip in a door latch situation.
Here are some tips:
1. Consider the cups available which allow you to drill a hole, install the cup with a screw, then install the rare earth magnet. This provides a permanent mounting. One can remove a magnet from a cup, but it requires epoxying a handle to the magnet first. Another benefit of the cups is they adapt the magnets to standard drill sizes. A magnet installed with glue could get yanked from its hole by the opposing magnet over time when the glue fails. Since the magnets are smooth, it could be difficult to get good adhesion.
2. If you plan ahead, you could install the bare magnet in a hole drilled from the back side of the surface. This would effectively create an invisible magnet, as well as negating the need for the cup.
3. Play with the distance of the magnets from one another to determine the amount of opening resistance you would like. Use a deck of cards between the two magnets and add or remove cards until you like the resistance amount. once you establish the right distance for your application, use that info to determine hole depth and arrangement.
4. As an alternative to #2 above, and with information from experimentation in #3 above, you can embed the magnets within the pieces of wood involved before it all gets assembled. Do this by ripping your part while it is still over sized, then drill a recess between the parts, install the magnet and glue it back together. Then finish size your part. Harder to picture than it is to actually implement.
5. As an aside, I built an entertainment center and was able to "float" the speaker panels in mid air by installing magnets on opposite edges of each panels. This prevented unwanted vibration, and is cool as all get out.
6. Consider a side swipe arrangement for your catch. By this I mean the magnet is installed in the edge of the door and its partner in the side of the jamb. The magnets would then approach one another in a non-linear way. This means no contact would need to be made, so no clunk in to a stop. Experiment on scrap first to establish distance for the best action.
To directly answer your question, "it depends". experiment as in #3 above, you will determine the best distance apart for your application. These magnets will not lose attraction over time, so no overkill required. It is that distance that will guide you in how best to mount them. I am fond of them being invisible, as in #4 above. You can accomplish the same effect by veneering over the part with the hole if your project is too far along to rip and embed.
I would suggest obtaining the magnets from Lee Valley, and obtain the correctly sized cups too. Order more than you need, as I would bet you will use them again after you see how many ways they can be used.
For some reason when I reduced the file size of this image, the console got shorter left to right, and so looks chunky. I assure you it is long and sleek in person. This is the project wherein the speaker grilles are floating in space. One removes them by simply pushing in on the grille frame until the magnets loose grip. This project was my first use of rare earth magnets, and I have refined my approach to generally hide them since then.


Regards,
Grant in Iowa