You already gave your best. You can't change the results now. What you can do is prepare for an upcoming exam in a planned manner. there is no use pondering over what has passed and what is no longer in your control. Just let it go. Who know, you might actually have done well in the exam. Don't overthink it
that's what I am trying to do but somehow I end up thinking about it.
Keep yourself occupied in other stuff .. hang out with friends, listen to music, or do anything that you like.. so that your mind doesn't wander off