Losing sucks. No one is going to deny that. No one is going to argue it.
Losing sucks because most of the time, you are giving 100%. You are working your ass off to win, and you somehow still end up short. Maybe it was an off day, a bad referee, or just a straight-up blowout. Regardless, it wasn't a win, and that hurts.
First off, you have to keep your head up. Sulking, dropping your shoulders, that is only going to make it seem worse. Lift your head up, raise your chest, and look forward to the next game. Pick out what you did well, and focus on the positives rather than weighing all of the negatives.
Second, do not make excuses. It is one million times easier to blame your teammates, other players, the wind trajectory, or the stars for the reasons you may have lost, but that isn't going to change the final outcome. You have to face it, understand that it happened, and put any other reasons behind you.
Let it fuel you. Internalize how that feeling sat in your stomach as the final whistle blew, bottle up how furious or upset you were when you looked up and saw the final score. Use those feelings, that fire, to fuel you and pump you up for the next time you set foot on the field.
Finally, use the loss as motivation, as a learning tool, use it as a lesson. Shape it any-which-way you need in order to learn something from it. Whether you improve personally--clean up the first touch, put that extra sprint in--, or you improve as a team--work collectively rather than individually, use language constructively rather than negatively--, use the loss to gain something toward your next success.
Winning is a great feeling, there's no doubt about it. As great as it is though, playing a sport does not come with unlimited guaranteed wins. There are going to be losses, and there are going to be ties, and there are going to be ties that feel like losses, but you cannot let them get to you. Pick your head up, pull your shoulders back, look forward to the next chance you get, and fight for that win.