When trying to serve shorter, many players slow down their swing, and when trying to serve long they speed up their swing. Both are mistakes – that's not how you control depth or even ball speed.
"Serving is a violent motion," said two-time (and soon to be five-time) U.S. Men's Champion and future long-time U.S. Men's Team Coach Dan Seemiller at a training camp in the late 1970s – and those words have always stuck with me. If you want to maximize the spin, you maximize the racket speed. (You do this with smooth acceleration, but that's another topic.) If you want to maximize the speed, you also maximize the racket speed (at least as fast as you can make it and keep it on the table).
So how do you adjust the depth? Not by changing the racket speed, which should always reach a maximum around contact, but by three things: the grazing contact; where the ball bounces on your side of the table; and the spin.
If you barely graze the ball, you get two things: more spin and less speed. This means a shorter serve (i.e. one that would likely bounce two or more times on the far side if given the chance). As you sink the ball a bit more into the sponge, you get more speed and so the ball goes deeper. You also lose a little spin – though not as much as you'd think. More of your energy now goes into speed and so you lose some spin, but you also gain some spin from the rebounding of the sponge, since you've sunk the ball slightly into it at an angle.
And so you can control the depth primarily by how much you graze the ball. Want it to go short? Graze it finely (and get more spin as well), and the ball will travel slower, and so land shorter. Want it to go longer? Sink it a bit more into the sponge.
You also control depth by where it bounces on your side of the table. If the first bounce is near the net, you'll tend to get a shorter serve. If it's nearer your own end-line, then the ball has a long way to go to get to the net – 4.5 feet – and so will likely bounce deeper. Most top players like to serve the ball so the first bounce is as close to their own end-line as possible while still barely going short (with the second bounce on the far side, given the chance, right on the end-line or sometimes just a touch past it).
You also control depth with spin – backspin will make it bounce shorter, topspin longer. A good sidespin serve can also make the ball go shorter as it curves the ball sideways, keeping it over the table rather than bouncing out.
You also can keep the ball shorter by serving it low over the net – but that's a given. Always serve low to the net. You also can get a "shorter" serve by serving crosscourt, where you have more table, instead of down the line.
So learn to serve with that "violent" motion, and vary the depth with your contact, first bounce, and spin. It's easy to remember – Contact, Bounce, Spin = CBS! (After practicing your serves, you have my permission to go watch TV.)