Does formatting an SSD shorten its lifespan?
In general, formatting a solid-state drive will not impact its lifetime, unless you perform a full format - and even then, it depends how often. Most formatting utilities allow you to do a quick or full format. The quick format just overwrites the partition and file tables, but does not actually physically delete anything off of the disk.
In contrast, a full format will go through each sector on a disk and "reset" it. This can degrade the lifetime of the SSD. That being said, MLC solid state drives have a write limit of around 10,000 before the sectors begin to fail.
So long as you don't do it often, (fully) formatting the drive a few times won't seriously impact on the drive lifespan.
Formatting = writing.
Modern SSDs have a command for clearing all data, ATA Secure Erase. Take a look in the software provided by your SSD manufacturer.