One could say a lot on how to deal with this, however it is a welcome insight.
It seems to me that according to you; there is suffering.
A good start. You have identified some suffering, go from here. It is definitely conditioned, has orgin in something and is not your fault at very least, you did not know better.
The Tathagata s teach the cause and the path to cessation of all suffering by means of knowing better!
Development of Four Frames of Reference, Five Strenghts, Five Faculties and bringing the Seven Factors of Enlightenment to Culmination.
According to yours truly, your primary weapon will be training Satipatthana according to either Mahasi or similar Sati oriented method, secondary weapons will be these three texts, id learn them by heart:
skip to end if tl;dr: Relaxation of Thoughts Sutta, Two Types of Thinking, Verbalizations of Craving.
When evil unskillful thoughts connected with desire, hate, and
delusion arise in a bhikkhu through reflection on an adventitious
object, he should, (in order to get rid of that), reflect on a
different object which is connected with skill. Then the evil
unskillful thoughts are eliminated; they disappear. By their
elimination, the mind stands firm, settles down, becomes unified and
concentrated, just within (his subject of meditation).
...
If the evil unskillful thoughts continue to arise in a bhikkhu, who in
order to get rid of an adventitious object reflects on a different
object which is connected with skill, he should ponder on the
disadvantages of unskillful thoughts thus: Truly these thoughts of
mine are unskillful, blameworthy, and productive of misery. Then the
evil unskillful thoughts are eliminated; they disappear. By their
elimination, the mind stands firm, settles down, becomes unified and
concentrated, just within (his subject of meditation).
...
If evil, unskillful thoughts continue to arise in a bhikkhu who
ponders on their disadvantageousness, he should in regard to them,
endeavor to be without attention and reflection. Then the evil
unskillful thoughts are eliminated; they disappear. By their
elimination, the mind stands firm, settles down, becomes unified and
concentrated, just within (his subject of meditation).
...
If evil, unskillful thoughts continue to arise in a bhikkhu in spite
of his endeavor to be without attention and reflection as regards
evil, unskillful thoughts, he should reflect on the removal of the
(thought) source of those unskillful thoughts. Then the evil,
unskillful thoughts are eliminated; they disappear. By their
elimination, the mind stands firm, settles down, becomes unified and
concentrated, just within (his subject of meditation).
...
If evil, unskillful thoughts continue to arise in a bhikkhu in spite
of his reflection on the removal of a source of unskillful thoughts,
he should with clenched teeth and the tongue pressing on the palate,
restrain, subdue and beat down the (evil) mind by the (good) mind.
Then the evil, unskillful thoughts connected with desire, hate and
delusion are eliminated; they disappear. By their elimination, the
mind stands firm, settles down, becomes unified and concentrated, just
within (his subject of meditation).
https://www.accesstoinsight.org/tipitaka/mn/mn.020.soma.html
I was still just an unawakened Bodhisatta, the thought occurred to me: 'Why don't I keep dividing my thinking into two sorts?' So I made
thinking imbued with sensuality, thinking imbued with ill will, &
thinking imbued with harmfulness one sort, and thinking imbued with
renunciation, thinking imbued with non-ill will, & thinking imbued
with harmlessness another sort.
"And as I remained thus heedful, ardent, & resolute, thinking imbued
with sensuality arose in me. I discerned that 'Thinking imbued with
sensuality has arisen in me; and that leads to my own affliction or to
the affliction of others or to the affliction of both. It obstructs
discernment, promotes vexation, & does not lead to Unbinding.'
"As I noticed that it leads to my own affliction, it subsided. As I
noticed that it leads to the affliction of others... to the affliction
of both... it obstructs discernment, promotes vexation, & does not
lead to Unbinding, it subsided. Whenever thinking imbued with
sensuality had arisen, I simply abandoned it, dispelled it, wiped it
out of existence.
"And as I remained thus heedful, ardent, & resolute, thinking imbued
with ill will arose in me. I discerned that 'Thinking imbued with ill
will has arisen in me; and that leads to my own affliction or to the
affliction of others or to the affliction of both. It obstructs
discernment, promotes vexation, & does not lead to Unbinding.'
"As I noticed that it leads to my own affliction, it subsided. As I
noticed that it leads to the affliction of others... to the affliction
of both... it obstructs discernment, promotes vexation, & does not
lead to Unbinding, it subsided. Whenever thinking imbued with ill will
had arisen, I simply abandoned it, dispelled it, wiped it out of
existence.
"And as I remained thus heedful, ardent, & resolute, thinking imbued
with harmfulness arose in me. I discerned that 'Thinking imbued with
harmfulness has arisen in me; and that leads to my own affliction or
to the affliction of others or to the affliction of both. It obstructs
discernment, promotes vexation, & does not lead to Unbinding.'
"As I noticed that it leads to my own affliction, it subsided. As I
noticed that it leads to the affliction of others... to the affliction
of both... it obstructs discernment, promotes vexation, & does not
lead to Unbinding, it subsided. Whenever thinking imbued with
harmfulness had arisen, I simply abandoned it, dispelled it, wiped it
out of existence.
https://www.accesstoinsight.org/tipitaka/mn/mn.019.than.html
"And which are the 18 craving-verbalizations dependent on what is
internal? There being 'I am,' there comes to be 'I am here,' there
comes to be 'I am like this' ... 'I am otherwise' ... 'I am bad' ...
'I am good' ... 'I might be' ... 'I might be here' ... 'I might be
like this' ... 'I might be otherwise' ... 'May I be' ... 'May I be
here' ... 'May I be like this' ... 'May I be otherwise' ... 'I will
be' ... 'I will be here' ... 'I will be like this' ... 'I will be
otherwise.' These are the 18 craving-verbalizations dependent on what
is internal.
"And which are the 18 craving-verbalizations dependent on what is
external? There being 'I am because of this (or: by means of this),'
there comes to be 'I am here because of this,' there comes to be 'I am
like this because of this' ... 'I am otherwise because of this' ... 'I
am bad because of this' ... 'I am good because of this' ... 'I might
be because of this' ... 'I might be here because of this' ... 'I might
be like this because of this' ... 'I might be otherwise because of
this' ... 'May I be because of this' ... 'May I be here because of
this' ... 'May I be like this because of this' ... 'May I be otherwise
because of this' ... 'I will be because of this' ... 'I will be here
because of this' ... 'I will be like this because of this' ... 'I will
be otherwise because of this.' These are the 18 craving-verbalizations
dependent on what is external.
https://www.accesstoinsight.org/tipitaka/an/an04/an04.199.than.html
You will also need to support yourself by calming the mind by non-regret and thinking delightful themes, ie friendly thoughts, your virtues, virtues of moral behavior, heavenly realms, good-will, reflecting on greatness of the teacher, those in training and those who have completed the training, on the goal, on the non-attractiveness, the repulsiveness, non-delight & Death.
Biggest support you could arrange for yourself is to put yourself in a group where people are also training same things and run away from people who dont.
If you live with people who are learned, follow same regiment, dont engage in chatter, hold same views and restrain eachother from falling away it will be a huge support.
This kind of training will make you see straight. Thinking patterns will become progresively more pleasant and controlled, behavior will be based on that very thinking and thus of pleasant result.
Even if you know your thiking is unpleasant now, the "pathways" to put it in wordly terms, the neural pathways are irrational because feelings are given higher value than their real value. It takes active "work", to weaken those "structures" and build a healthy world view to as a foundation for a happy life and healthy behavior.
I guarantee if you do these things even for one day and one night you will have more or less solved your problem.