This is a procedure for getting free from your mind’s habitual patterns:
Select an “object of meditation.” This can be any concept or label but for greatest immediate benefit should be rooted in gratitude, kindness or appreciation.
You may repeat a word or phrase that you find resonance with such as “So kind” or “gentle” or “peace”. Otherwise you may imagine a moment or memory when you felt gratitude, kindness or appreciation and hold that image centered in your heart, your chest.
As you repeat this it becomes automatic and your mind will wander. Be ready when it does and observe what it gets up to. You will begin to separate from the habitual patterns as you are able to observe this and you can establish with clarity that you are not this, you are not trapped in these habits you are simply not used to being aware that they are not you.
This is called one pointed meditation or shamatha. There is a tremendous amount to learn from this process. That treasure chest is yours alone to discover.
Another procedure to help accomplish the same thing is:
Instead of a mentally or emotionally produced and selected object of meditation your focus is on the events of your day. While you engage in whatever you are doing, observe the mind and what it does.
The two procedures work best combined. Do the meditation daily if possible, starting with just a few minutes. This is like preparing the garden bed, it nourishes the soil and reduces the weeds. The Mindfulness can be done at every opportunity, all the time in fact. Most importantly remember to be kind and gentle to yourself in either process.
Over time you will obtain a brief moment in which you are free to make choices that are intentional and authentic to you rather that respond to events on autopilot. This is an extremely valuable gift we can all develop with gentle persistence.