I usually play a song that everyone knows and likes for the last song, something at a moderate tempo, because I find everyone tries to dance that last song. That's if I'm finishing the night.
If I'm followed by another DJ I try to play something high energy that'll fill the floor so the next DJ has something to work with, and so that people are left with good memories of my set 
RE the 5 or so songs before I end... ummm... I don't usually have a plan. Often the last three or so are spent sorting out the next DJ, organising birthday/welcome dances (which I like to do between sets), etc etc. That's if I'm going first, which I prefer to do at usual weekly gigs, as I like to dance the last part of the night.
If I'm the last DJ I'm usually just working the wave, and generally trying to see just how manic I can make the dancers, playing crazy high energy music. If it's a slightly longer set, I've usually spent the penultimate block of songs easing off a bit so dancers get a rest (emotionally if not physically - I play less high energy or less intense music), so I go a bit harder in the final block.
To be honest, I don't plan my sets that carefully, and I very rarely plan any part of my set beyond the first few songs before I begin. And even then, I'm picking songs in the five minutes before my set starts, working on what the DJ before or the class before has been doing. So I really don't know what I usually do in the last part of my sets, and I find the crowd/heat (especially in summer)/venue/event will dictate what's going to happen.