"Nothing good ever happens after 2 am"
Most of the time the decisions we make at two in the morning are the ones we regret. The infamous "tramp stamp" is the most remarkable consequence when Ted decided not to follow his own advice. Normally at this hour, we do not think straight and make the most unwise, egocentric and more often than not the shameful decisions in life. Ted is telling us to sleep it off, and get back to it when you wake up the next morning when you are more rational.
"But love doesn't make sense, you can't logic your way into or out of it."
Ted has proven on several occasions that he is the most hopeless romantic among them. There was the blue french horn which he stole from the Carmichaels just because Robin said she wants it in her apartment; or the time he took Stella to a two-minute date just because she doesn't have the time. We have had that moments in our lives when we to crazy stuff we do not normally do just to make someone smile. Your friends might have questioned your sanity at some points but hey, it doesn't have to make sense.
"Sometimes, even if you know how something's gonna end, that doesn't mean you can't enjoy the ride."
Ted had quite an adventure as he went on a roller coaster ride in finding The One. It wasn't all fun for him, he had some difficult times too. But he learned to appreciate and absorb the lessons he learned in his failed relationships. After Ted finally let go of Robin (or so we thought) when she got engaged to Barney; he dated around, and a lot. This was time when Ted wanted to see what New York has to offer for him. Sure some of his dates turned out to coocoo (Jeanette, the crazy stalker would be the best example) and some turned out to be almost perfect (Victoria, sweet Victoria) but she just wasn't The One. All these experiences led Ted to The Mother and it was one ride he enjoyed.
"The universe has a plan, kids"
When Ted finally decided to stop dating and settle down (yep, this was after he dated stalker Jenny) he just stopped looking for "her". He lets the universe do its job when Ted decided to take a job offer in Chicago to start anew, and just like that he met The Mother at the station when he was at the Farhampton Train Station. Sometimes, fate tricks us like that, just when you stopped looking then you finally find what have you been searching for.
Here's one big lesson we all learn from Ted Mosby;
We should never give up on love, even if sometimes we feel that it has given up on us.