Right. If I were you this is what I would do.
If John and William were indeed twins, and William's age in the 1901 census is correct, John should be aged about 28 in 1903.
So I would go to
www.scotlandspeople.gov.uk and buy 30 credits for £7. I would then search for a death of *nderson, John, between 1901 and 1903, aged 20 to 50, in Lanark(shire), which will produce 22 matches. Or maybe 1901 to 1904, age range 20 to 45, which produces 24 matches. Then I would use one credit to view the matches, and see if there are any which look likely.
If the listed matches contain one aged about 28, death registered in Glasgow*, I'd use 5 more credits to look at his death certificate and see the cause of death. I'd still have 24 credits, which is enough to look at 4 more certificates if I got the first one(s) wrong, plus enough to view two 'Registers of Corrected Entries' which there are likely to be as it was a case of suicide.
*Glasgow contains a number of registration districts, e.g. Kelvin, Partick, Gorbals, Dennistoun etc etc.
The death certificate would tell me the full names of both of John's, and therefore William's, parents, including his mother's maiden name.
Happy hunting!