Obsessed With Scale

How do I stop my mood for the day being dictated by the number on the scale? I’ve lost 2kg in my first week and have been ecstatic obviously seeing it go down daily but today it was up 300g, when i fasted longer than usual and was more active than usual too. So today I’m so mad and upset (which is just my thoughts I know), and I’m trying to replace the thoughts with positive ones but it’s like having an argument with an illogical toddler who doesn’t care about reason just the number. I know I’m only meant to use the number as information about my protocol but I guess it’s how I have defined myself my entire life and my success. How can I turn this around?