You can deliver the best sales presentation of your life and still lose. The question is this: what do you do then?
You could be more gracious than if you’d won the work. You could send a thank you note for the time invested, you could sing the praises of the vendor chosen in your stead and you could congratulate the buyer, “based on the criteria you set out, it’s clear that you made exactly the right choice for your organization right now.” That doesn’t mean the criteria were right, it just means that you’re not attacking the person for being an impulsive lunatic. You could even outline what you learned from the process and what you’ll be changing in the future. And you can make it clear that you’re in it for more than just a sale, and you’ll be around if they ever need you.
Remember, just because you’ve lost the pitch, doesn’t mean that you won’t ever get another chance with the prospect. Being a good sport might allow you to win the next job.