Negative self talk can be one of two things- a learned habit (being around it during childhood or being exposed to it through co workers, family, friends, etc) or it can be as a result of a low self esteem.
People curse because it helps them express strong emotion. Usually it is used to let out feelings of anger, fear or other emotions. It's like a horn on your car. You use curse words to get attention from yourself and others to cope with and express your emotions.
If you are noticing others are reacting to your cursing and it's happening around people like supervisors, then it needs attention. Cursing can draw negative attention to you and give others a perception of you that is inaccurate.
You can change your negative self talk, it may just take some time and persistence. The first step is to begin noticing how you think and what your thoughts are during the day. How you think is either negative or positive, or maybe a little of both. Most people have a mixture of the two throughout the day. As you learn your pattern of thinking, start paying attention to what kinds of thoughts you are having. Do they seem overly negative, even if the situation is positive? Do you feel depressed, angry or upset more often than not? Are their feelings that you feel you need to express but can't?
As you begin to notice your thoughts, you can challenge them. Start by testing your thoughts. For example, if you think that your co worker is annoying and feel upset about it, ask yourself if this is accurate or if you are just feeling frustrated in general. In other words, are you just taking your feelings and putting them on this other person? And even if it's true that they are annoying, what does feeling upset about it your change? Overreacting to someone else's behavior can make you more upset.
Another step is to recognize when you feel upset and put a stop to expressing it. When you feel you want to curse, say stop to yourself. You can even use a rubber band and snap it when you feel yourself starting to curse. This is a way to associate a bad feeling with the cursing. You can also use accountability to stop cursing. Ask friends and family to help you notice when you are cursing. Use a "swear bank" and pay a set amount of money to it each time you curse. Make sure your friends and family know about it so they can check up and see if you are following the rules.
Ask yourself if the cursing is helping you or hurting you. And if it's hurting you, why are you doing it? Do you feel you need to express your emotions in such a way that it works against you? Is there another way to express yourself that is less damaging? By answering these questions, you can get to the root of your issue and change it.