They were friends who were both in Whammy's House as kids. Neither the anime nor the manga goes into much detail about their relationship, but they're probably pretty good friends; they're shown working together several times.
They were both at the Wammy House, While Near and Mello were the top 2, Matt was the 3rd smartest child. He decided to join Mello's crew.Sure Mello was upset over getting Matt involded(killed) but he wasnt crying over it. No yaoi was involved.
The anime never even introduces Matt, But in the manga they are shown working together and also growing up at wammys. It does not show them as friends just acomplices. The only that shows they ever liked eachother is when Mello apologizes for getting matt killed. But other then that we don't really know.
In the canon series if Death Note. Mello and Matt were merely best friends. Mello crying over Matt does not imply that they are in a 'sexual' or 'boy to boy yaoi' relationship. I mean I would cry over it if my best friend died. My theory is that yaoi fangirls got the 'crying over Matts death' alittle confusd with yaoi.