Your symptoms are most likely due to a persistent viral infection or chronic fatigue syndrome, and not TB or HIV.
TB recurrence is unlikely since you underwent successful treatment seven years back for TB, and your current ESR is normal with a normal chest x-ray. HIV infection is also unlikely since acute HIV infection (or seroconversion) is never diagnosed based on presenting symptoms. Only a repeat positive antibody (ELISA) test is confirmatory. The symptoms of acute HIV infection resemble other, more common, self-limiting, viral infections like colds, flu, infectious mononucleosis, or streptococcal sore throat, etc., and these common conditions are often aggravated by stress and anxiety.
Though there is a remote theoretical possibility of HIV infection, but only in case your friend is HIV infected or has indulged in unsafe sex with multiple sexual partners. Moreover, the efficiency of HIV transmission during heterosexual route is very low, and this can be practically eliminated by using barrier protection like condoms. There is a test for p24 antigen that can detect HIV infection before enough antibodies are present to be detected by an ELISA test. These p24 antigens disappear, however, by the time antibodies develop. The p24 antigen test does have a role for patients who have had a significant risk for HIV infection within the last few weeks and are currently experiencing symptoms of HIV seroconversion. Alternatively, a PCR test can also be done to look for HIV RNA and this may be useful in the window period, before antibodies develop. However, you most probably do not need these tests.
Whatever you do please understand that your risk of infection is quite low. Do consult a mental health professional for your anxiety and feelings of suicide.