Talk to your team about what went well. While the result may not have been what was hoped for, that's not the only reason the squad took the field. Teams have goals other than winning, such as trying their best until the final whistle or improving in key areas. Emphasize progress towards those goals.
Don’t point fingers. It's easy for players to get along after a win, but losses can be natural times for individuals to blame others for the defeat. If a player is inconsolable after making an error in a key spot, make it clear in your postgame comments that one play didn't determine the outcome. Extend this lack of blame to officials as well -- losing a game shouldn’t be blamed on an umpire’s call.
Balance criticism with praise. The Positive Coaching Alliance, or PCA, suggests using a "criticism sandwich" to interject suggestions for improvement with praise. If you're coaching a baseball team, for example, you might compliment how well your team fielded, note that you'd like to see everyone make smarter decisions on the basepaths next game, and then offer another bit of praise that leaves the players with a positive message.
Look ahead to the next competition. One of the challenges after a tough loss is getting the team to look forward rather than dwelling on the defeat. If the season isn’t over, turn the focus to the next game or tournament and the opportunity for a more positive result the next time the team takes the field.
Remind them of what they’ve done. When a loss ends the season, the best way to console a team is to review what they’ve accomplished during the year. Bring up the big wins and the growth of the players of the team. Talk about how proud you are of how they played this season and how much you're looking forward to what's to come.