Hi Andrew and welcome to DWD.
Sweetheart please go back and see the dr and tell them about these suicidal thoughts. It's really important. If you think that you might act on them or hurt yourself then please go to A+E and ask to see the on call mental health nurse. You can get through this, sounds like you need a bit of extra help right now. Her sleeping with your best friend isn't great for you, and finding out in the way that you did can't have helped - but you can move forwards...