honestly... keeping busy. our brains tend to function in the moment, as most humans live in the moment when their mind isn't idle and wandering. when i'm with a friend or someone else, i never think about ctb.
rewarding yourself (in moderation) can work, too. spoil yourself every now and then. buy your favorite food, get that sweater you've been eyeing for the past few weeks... but don't get heart disease or become an excessive spender, y'know?
oh, and immersing yourself in your hobbies. i play guitar and i get really into it if i'm jamming hard. i don't have time to think about ctb when i'm trying to get down a certain chord progression. listening to your favorite songs, starting a new personal project or picking up something are a few things you can try, if you'd like.
i, too sort of want to get better, so i can see where you're coming from. i'm sorry that your meds have been giving you a hard time. like chris8000 said, cbt is great and a lot of people do. there's also dbt (dialectical behavior therapy), which i tried out last summer. it was very pleasant and relaxing.
i wish you the best of luck!