Formatting, in-camera, is the best thing to do.
Realistically, though, anything else you could do (delete all, delete one-by-one, format on computer, etc.) is about 99.9% as good. Fifteen years ago, some cameras had compatibility issues with formatting or deleting on the computer, but those days are long gone -- and those were issues with CF cards, anyway, not SD-type cards (SDXC may be a different critter, since it uses the relatively new exFAT format designed specifically for flash memory).
As far as wearing out the card rewriting it, formatting does one write on each affected block where deleting does one write on each affected block per file, and more blocks could be affected, although I suspect many cameras handle "delete all" the same way they do "format". Even so, the number of people who've experienced worn-out memory cards is probably so small as to be irrelevant. All CF cards came with wear-leveling, and some modern SD-type cards now have it. It's not like you'll probably be using those same cards for decades to come -- they'll be too tiny and slow compared with what'll be coming out a few years down the road.
When deleting individual files, I do make it a point to try to delete only the most recent. That can help if I ever need to recover deleted files because files created after I deleted will be placed in contiguous memory slots in available space, not partly in the "holes" from the deleted file and partly at the beginning of available space. Even so, I think of that as being borderline OCD behavior, since in 15 years of digital photography, I've never actually needed to recover deleted data from a memory card.
It really doesn't matter. But yes, formatting in-camera is the best if that's convenient for you.