Better luck next time
This phrase is commonly used in commiseration, after a failed attempt to do something or other; dates from the early 1800s.