How can you stop a friend from burning themselves?

Tough love. If your friend seems in imminent danger of self-harm, call 911. If your friend has stated a plan to set themself on fire or something else crazy, make a police report and phone the friend's physician and mention it to other friends / decent family members. This is the true test of friendship -- saving the person often in spite of themself.