As mentioned, for the intrusive thoughts it will probably be a good idea to talk to a priest for advice, and likely a doctor as well especially going by your other topic a couple days ago. Thoughts that you don’t choose and don’t consent to aren’t sins, but they do cause much undue stress.
On forgiveness, any sin you are sorry for, turn away from and repent of in confession, God will forgive.
And as for getting closer to God… same as above pretty much. Go to Mass often (each Sunday is mandatory, but more is still encouraged), receive the sacraments (go to confession especially when in mortal sin, and then once forgiven receive our Lord in the Eucharist at Mass), think about our Lord’s sacrifice for us, pray often, ask Mary and the saints for their prayers, and so on. When you pray, you can recite prayers but just talking to God is great as well, ideally both.
One thing I’ve found helpful is to focus on seeing God’s love in everyday life. I used to get frustrated that God didn’t just reveal Himself to me with a dream or a booming voice from the clouds, but then I realized I was kind of missing the point, that I had my idea of what I wanted and really wasn’t being open to His will.